Save as dialogue box


Posted by Simon McArdle on May 15, 2001 11:43 PM

Hi,

Does anybody know what code I need in my macro to bring up the save as dialogue box, type in the new file name and save the file where I want. Maybe a bit of VB code or a built in function...not really sure.

Thanks
Simon



Posted by Dave Hawley on May 16, 2001 5:38 AM

Here are two methods

Sub TryThis()
Dim sFileName As String
sFileName = Application.GetSaveAsFilename
If sFileName = "False" Then Exit Sub
ActiveWorkbook.SaveAs sFileName
End Sub


.....OR


Sub TryThis()
Application.Dialogs(xlDialogSaveAs).Show
End Sub

OzGrid Business Applications