ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs Maceo - Specify Folder it Autoselects to Save In (https://www.excelbanter.com/excel-programming/339373-saveas-maceo-specify-folder-autoselects-save.html)

Z Nicodemous[_2_]

SaveAs Maceo - Specify Folder it Autoselects to Save In
 
Hi There,

I am using a Macro to throw up a "Save As" Prompt when someone creates a new
spreadsheet.

I would like to know if its possible to make it so that when the "SaveAs"
prompt it thrown up, it automatically is in thefolder "w:/PCD Service
Desk/Jobs/"

Here is the code for the save as macro im using:

'Retrieve file name to use for Save
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls")

'If user specified file name, perform Save and display msgbox
If fileSaveName < False Then
ActiveWorkbook.SaveAs Filename:=fileSaveName, FileFormat:=xlNormal

MsgBox "Save as " & fileSaveName
End If


This isnt something i made myself, i found the code for it on the internet
that someone was kind enough to share.

I hope someone can help

Regards
Zach Nicodemous

William[_2_]

SaveAs Maceo - Specify Folder it Autoselects to Save In
 
Hi

Try inserting this at the start of your code....

Dim str as string
str="w:\PCD Service\Desk\Jobs"
ChDrive str
ChDir str

--


XL2003
Regards

William



"Z Nicodemous" wrote in message
...
Hi There,

I am using a Macro to throw up a "Save As" Prompt when someone creates a
new
spreadsheet.

I would like to know if its possible to make it so that when the "SaveAs"
prompt it thrown up, it automatically is in thefolder "w:/PCD Service
Desk/Jobs/"

Here is the code for the save as macro im using:

'Retrieve file name to use for Save
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls")

'If user specified file name, perform Save and display msgbox
If fileSaveName < False Then
ActiveWorkbook.SaveAs Filename:=fileSaveName,
FileFormat:=xlNormal

MsgBox "Save as " & fileSaveName
End If


This isnt something i made myself, i found the code for it on the internet
that someone was kind enough to share.

I hope someone can help

Regards
Zach Nicodemous





All times are GMT +1. The time now is 06:45 PM.

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