ActiveWorkbook.SaveAs mit Variablen

Hallo Zusammen

Möchte eine Datei aus Variablen speichern.

MyPath = „C:“
Name = Cells(1,1)
Jahr = Cells(1,2)

ActiveWorkbook.SaveAs MyPath & Name & Jahr

klappt nicht, es wird nur unter Name abgespeichert.

Geht das überhaupt ?

Gruss

MyPath = „C:“
Name = Cells(1,1)
Jahr = Cells(1,2)

ActiveWorkbook.SaveAs MyPath & Name & Jahr

klappt nicht, es wird nur unter Name abgespeichert.

Hallo Snetto,

ActiveWorkbook.SaveAs MyPath & Name & Jahr & „.xls“

Gruß
Reinhard

Hallo Reinhard,

ActiveWorkbook.SaveAs MyPath & Name & Jahr & „.xls“

Er speichert auch nur unter Name, Jahr wir ignoriert.

Gruss
Snetto

ActiveWorkbook.SaveAs MyPath & Name & Jahr & „.xls“

Er speichert auch nur unter Name, Jahr wir ignoriert.

Hallo Snetto,

gut, so wird das nix, denn bei mir klappt es. lade mal eine Beispielmappe hoch mit file-upload.net o.ä s. FAQ:2606
wo das nicht funktioniert.
Welche Excelversion? Obwohl unwichtig, müßte bei allen klappen.
Äh, das ist jetzt keine Aufforderung sie nicht zu nennen :smile:

Gruß
Reinhard

Hallo Reinhard

Hatte die Zellen falsch zugewiesen. Anstatt nach unten bin ich nach rechts gesprungen. Und wo nichts drin ists… kann nichts rauskommen :wink:

Ich danke Dir
Snetto