#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel97 vs Excel2000 bob engler Excel Programming 0 April 1st 04 05:01 AM
Excel2000 Christina Feichter Excel Programming 0 January 26th 04 07:38 PM
excel2000-question piet Excel Programming 4 December 24th 03 07:56 PM
compiling VBA in Excel2000 Juggernath Excel Programming 2 November 12th 03 03:06 PM
USERFORM in Excel2000 Bjorn Smink Excel Programming 0 November 11th 03 12:38 PM


All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"