Thread: excel2000
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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