Open 'Save As' dialogue box using Macro

  • Thread starter Thread starter Zainuddin Zakaria
  • Start date Start date
Z

Zainuddin Zakaria

I have chosen to hide the Menu Bar.
How do I let users save their work?

I plan to create a button and assign a MACRO to it so that users can click
and 'SAVE AS' their file by first typing in the file name. Can someone come
out with a macro command for this?

Also a macro command to EXIT button (without saving the file).

Thank you so much.


Zainuddin Z
 
Hi Zainuddin,

Try this...

Sub Test()
fileSaveName = Application.GetSaveAsFilename(fileFilter:="Excel Files
(*.xls), *.xls")
If fileSaveName = False Then
End
Else
ActiveSheet.SaveAs Filename:=fileSaveName
End If
End Sub

Regards
Ankur Kanchan
www.xlmacros.com
 
Back
Top