Open a "save as" dialog box using a macro
Open a "save as" dialog box using a macro
(OP)
What VSB language make it possible to open a "save as" dialog box when running the macro? Also a problem for me is, how to refer the default filename in the "save as" dialog box to a cell contents in the concerned worksheet? Thanks in advance for your help.
RE: Open a "save as" dialog box using a macro
TTFN
RE: Open a "save as" dialog box using a macro
Unfortunately this is not working because I am not able to stop the macro when the save as dialog box is open. My problem is to create a macro that only opens the "save as" dialog box.
RE: Open a "save as" dialog box using a macro
1.record the macro and go through "save as" procedure
2. insert a file name like XXXXXXXX (something identifiable)
3. once you have seved it and are back in the spreadsheet, stop recording the macro.
4 go into edit macro and delete everything after the command that calls your file xxxxxxxx. transferr the name you want to call your file and close macro.
with some fiddling about this should be able to work.
RE: Open a "save as" dialog box using a macro
Three simple lines of code will do all you ask:
Sub FileSave()
ChDir ("C:\WINDOWS\Desktop\")
MyFileName = Range("A1").Text
Application.Dialogs(xlDialogSaveAs).Show MyFileName
End Sub
This macro takes the text from cell "A1" and inserts it into the "save as" dialog box file name box. The ChDir command just sets the directory location where the saveas dialog box opens.
Good Luck!
jproj