ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting a default path name under Save As Dialog Box (https://www.excelbanter.com/excel-programming/368705-setting-default-path-name-under-save-dialog-box.html)

Shams

Setting a default path name under Save As Dialog Box
 
Folks,
I am running a macro that should prompt the user to save the file under a
default path name. I would like the macro to save the file in, for example,
S:\Accounting\BSP 2006\File Name.

Could you please suggest a solution? Thank you.

Regards,
Shams.

Die_Another_Day

Setting a default path name under Save As Dialog Box
 
With Application.FileDialog(msoFileDialogSaveAs)
.InitialFileName = "S:\Accounting\BSP 2006\"
.AllowMultiSelect = False
If .Show = False Then Exit Sub
ActiveWorkbook.SaveAs Filename:=.SelectedItems(1)
End With

Try that...

Die_Another_Day

Shams wrote:
Folks,
I am running a macro that should prompt the user to save the file under a
default path name. I would like the macro to save the file in, for example,
S:\Accounting\BSP 2006\File Name.

Could you please suggest a solution? Thank you.

Regards,
Shams.




All times are GMT +1. The time now is 01:36 AM.

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