Save As Macro options

D

Danielle0904

I want to do a save as macro that will prompt the user to designate the file
location and enter their own personalized file name. Then once they click
okay to save, I want to be able to complete the macro by emailing it out.

Help!
 
R

Ron de Bruin

Hi Danielle

Install my Mail add-i and you have what you want
http://www.rondebruin.nl/mail/add-in.htm

For code look in the VBA help for

See this example GetSaveAsFilename

Sub Test()
Dim fname As Variant
Dim NewWb As Workbook
Set NewWb = Workbooks.Add(xlWBATWorksheet)
fname = Application.GetSaveAsFilename("", _
fileFilter:="Excel Files (*.xls), *.xls")
If fname <> False Then
NewWb.SaveAs fname
NewWb.Close False
Else
NewWb.Close False
End If
End Sub

For mail code see my Mail page
 
P

Per Jessen

Hi

Try this.

Do
fName = Application.GetSaveAsFilename
Loop Until fName <> False And fName <> """"
ThisWorkbook.SaveAs fName

Regards,
Per
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top