Saving a File

S

scott

I'm trying to set the folder where I want the user to be in before invoking
the open/save dialog. The "ChDir" command isn't changing the current folder.
Can someone tell me the right code to change the current folder?

ChDir "S:\Spreadsheets"

Application.Dialogs(xlDialogSaveAs).Show
 
C

Chip

Dim startingname As String
startingname ="FILE NAME"
Dim myFileName As Variant
myFileName = Application.GetSaveAsFilename _
(InitialFileName:="c:\" & startingname)

If myFileName = False Then
'user hit cancel
Else
ActiveWorkbook.SaveAs Filename:=myFileName,
FileFormat:=xlNormal
End If
 

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