ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   GetSaveAsFileName Not Working (https://www.excelbanter.com/excel-programming/277911-getsaveasfilename-not-working.html)

Dan Gesshel

GetSaveAsFileName Not Working
 
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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

[email protected]

GetSaveAsFileName Not Working
 
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
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------




All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com