Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel2000
i want to build a macro that save the current file in a new name
the new name is known sach "file1" but the directory is variable according the user directory which from ther he open the current file the macro will save the file and replace an older one in the current directory i made this macro ActiveWorkbook.SaveAs Filename:= _ "TzOld.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False i copied the current file from directory YYY to another directory I open the file from the new directory but when i opperated the macro he saved the file in directory YYY thank you rozent |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel2000
You can use activeworkbook.path to obtain the folder that holds the
activeworkbook: ActiveWorkbook.SaveAs Filename:=activeworkbook.path & "\" & "TzOld.xls", _ ............. I don't understand about File1, though. ????? wrote: i want to build a macro that save the current file in a new name the new name is known sach "file1" but the directory is variable according the user directory which from ther he open the current file the macro will save the file and replace an older one in the current directory i made this macro ActiveWorkbook.SaveAs Filename:= _ "TzOld.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False i copied the current file from directory YYY to another directory I open the file from the new directory but when i opperated the macro he saved the file in directory YYY thank you rozent -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel2000
thank you david
your macro solved my problem rozent "Dave Peterson" wrote: You can use activeworkbook.path to obtain the folder that holds the activeworkbook: ActiveWorkbook.SaveAs Filename:=activeworkbook.path & "\" & "TzOld.xls", _ ............. I don't understand about File1, though. ????? wrote: i want to build a macro that save the current file in a new name the new name is known sach "file1" but the directory is variable according the user directory which from ther he open the current file the macro will save the file and replace an older one in the current directory i made this macro ActiveWorkbook.SaveAs Filename:= _ "TzOld.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False i copied the current file from directory YYY to another directory I open the file from the new directory but when i opperated the macro he saved the file in directory YYY thank you rozent -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel97 vs Excel2000 | Excel Programming | |||
Excel2000 | Excel Programming | |||
excel2000-question | Excel Programming | |||
compiling VBA in Excel2000 | Excel Programming | |||
USERFORM in Excel2000 | Excel Programming |