I am using GetSaveAsFilename
in VBA for Excel. Is there any way to give this a default folder to open up to? For example, I always want it to start at C:\
This works:
x = Application.GetSaveAsFilename(InitialFileName:="C:\mydocuments\music\", _
fileFilter:="Text Files (*.*), *.*")
However, if you have spaces in the filespec it gets a little trickier. For example, this:
x = Application.GetSaveAsFilename(InitialFileName:="%USERPROFILE%\My Documents\My Music", _
fileFilter:="Text Files (*.*), *.*")
only gets as far as My Documents and thinks that My Music is the filename. Hope this helps.