It is an easy one!
Sub CallUpSaveAs()
Dim sFileName As String
sFileName = Application.GetSaveAsFilename(Title:="Save File As")
If sFileName = "False" Then Exit Sub 'User cancelled
ActiveWorkbook.SaveAs sFileName
End Sub
Hth,
Dax.
James
You are able to display a "SaveAs" dialog box into which the user may enter a filename. Howver, this alone does not save the file, it simply returns the path/name by which the user wishes the file to be saved.
If you wish the file to be saved, you must use the FileSaveAs statement. It all goes something like this:
(I will show this as self-contained, but you may use the code anywhere you wish.
Sub SaveMyFile()
Dim myname As String
myname = Application.GetSaveAsFilename
ActiveWorkbook.SaveAs myname
End Sub
Any help?
Regards