SaveAs Maceo - Specify Folder it Autoselects to Save In

G

Guest

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
 
W

William

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
(e-mail address removed)
 

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