Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sep 24, 8:48 am, Joel wrote:
the filename need to be in double quotes ActiveWorkbook.SaveAs Filename:= _ ActiveWorkbook.Path & "\" & "tempfile.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False " wrote: On Sep 24, 7:28 am, wrote: I am writing a macro utility that will be used on several different PC's. One step in the macro saves a file using the path of the currently opened file (where the macro resides). This step works for my PC since the macro identifies my specific path. I need for this macro to work when the path of the currently open file is unknown. How would I do this? Thanks. I've tried the following coding as I want to save the file under a new name (tempfile) , but it keeps giving me an error ActiveWorkbook.SaveAs Filename:= ActiveWorkbook.Path & "\" & tempfile.xls" _ , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Whay doesn't this work? Perfect! Many thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving txt file from excel by specifying path - drop down directory explorer | Excel Programming | |||
Force Path for File Saving | Excel Programming | |||
Linked file in same folder but unknown path | Excel Programming | |||
Saving a file to a different path | Excel Programming | |||
Checking if workbook open (where path is unknown) | Excel Programming |