ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save As Macro options (https://www.excelbanter.com/excel-programming/409937-save-macro-options.html)

Danielle0904

Save As Macro options
 
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!

Ron de Bruin

Save As Macro options
 
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


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Danielle0904" wrote in message ...
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!


Per Jessen

Save As Macro options
 
Hi

Try this.

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

Regards,
Per

"Danielle0904" skrev i meddelelsen
...
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!




All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com