View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default File Save Question

I have never used this method but I would think you need to include the path
to the folder you want to save it in as part of the strFileSaveName variable:

strFileSvaeName = Application.GetSaveAsFilename _
("C:\Documents and Settings\Test " & strMnth, _
fileFilter:="Microsoft Excel Workbook (*.xls), *.xls")


"Ken Hudson" wrote:

At the end of a macro I have the following code:

strFileSvaeName = Application.GetSaveAsFilename("Test " & strMnth, _
fileFilter:="Microsoft Excel Workbook (*.xls), *.xls")
If strFileSvaeName = "False" Then
MsgBox "Action canceled."
GoTo End_it
End If
ActiveWorkbook.SaveAs Filename:=strFileSvaeName, FileFormat _
:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False

The WB that contains the macro also has a hyperlink in one of the cells.
This cell is never referenced in the macro. However, when I run the macro,
the default file save location is the hyperlink folder. I don't want that to
be the default file save location.

Have I explained this well enough for someone to tell me how to prevent it?
--
Ken Hudson