GetSaveAsFileName Not Working

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
 
P

pfsardella

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
 

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