PDA

View Full Version : Solved: GetSaveAsFilename



philfer
01-20-2008, 11:34 AM
Is there a way using the above to suggest a filename to save.

I know it is possible with Application.FileDialog(msoFileDialogSaveAs) but when I use this I cannot get the path to be a default path I want to set.

I can set the default path with GetSaveAsFilename but dont know how to fill the Dailog with a suggested filename

Bob Phillips
01-20-2008, 12:14 PM
Dim mpFilename As String
mpFilename = Application.GetSaveAsFilename( _
InitialFileName:="Somename", _
FileFilter:="Text Files (*.txt), *.txt")
If mpFilename <> False Then
MsgBox "Save as " & mpFilename
End If

philfer
01-20-2008, 12:21 PM
Sorry got it the wrong way around. I can set the suggested filename for GetSaveAsFileName but not FileDialog.

I need to either :-

1) Set suggested filename for FileDialog

OR

2) Set defualt path for GetSaveAsFileName (I tired ChDir etc but it didnt work)

Bob Phillips
01-20-2008, 12:33 PM
Set ChDir and ChDrive to the full target path