Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro for Save As
Message
De
22/10/1999 00:57:22
 
 
À
21/10/1999 16:52:27
Information générale
Forum:
Microsoft Office
Catégorie:
Excel
Divers
Thread ID:
00279645
Message ID:
00279785
Vues:
12
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform