Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro for Save As
Message
From
22/10/1999 00:57:22
 
 
To
21/10/1999 16:52:27
General information
Forum:
Microsoft Office
Category:
Excel
Miscellaneous
Thread ID:
00279645
Message ID:
00279785
Views:
11
>I'm creating a macro to save an Excel file under a few DIFFERENT names. The files are saved in the last directory used by Excel. This is not what I want. I would like the file to be saved in the same directory as the current file (the one I'm "saving as" a different name).
>
>Anyone has a clue?
>
>Thank you in advance.
You need to use the SaveAs method. The code is something like
       ActiveWorkbook.SaveAs FileName:= _
        "<path statement and filename>.xls", FileFormat:=xlNormal, _
        Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
        CreateBackup:=False
A quick way to find out what the macro should be is to turn the macro recorder on, perform the operation that you wish to do, stop the recorder and look at the macro in the Object Viewer. The recorder and the viewer are in the Macro tab in the Tools menu.
Previous
Reply
Map
View

Click here to load this message in the networking platform