GetSaveAsFileName Not Working

  • Thread starter Thread starter Dan Gesshel
  • Start date Start date
D

Dan Gesshel

Hello.

I am having a problem using the GetSaveAsFileName property. Actually,
the property seems to be working fine. However, when the Save As Box
comes up and the user presses "Save" it simply closes the dialog box.

It's not saving the file at all. I'm confused... am I missing a step or
is this a bug?

Here's the code I have so far.

Public Sub Filesave()

Dim sSave As Range

Set sSave = Sheets("SA200").Range("BR1")

fileSaveName = Application.GetSaveAsFilename(sSave, _
fileFilter:="Microsoft Excel Workbook (*.xls), *.xls")

Unload SaveIT
End Sub

Can anyone help?

Thanks.

Dan
 
From the VBE help
---------------------------
GetSaveAsFilename Method : Displays the standard Save As dialog box
and gets a file name from the user without actually saving any files.

SaveAs Method : Saves changes to the sheet (Syntax 1) or workbook
(Syntax 2) in a different file.

ActiveWorkBook.SaveAs Filename:=fileSaveName

----------------------------------------------------------------------------

I'm assuming that you want to save the ActiveWorkBook with a new file
name.

HTH
Paul
 
Back
Top