SaveAs not saving...
Hi Joe,
The GetSaveAsFilename method merely returns the user's selection. You need
to save the file.
So, after the fileSaveName line, insert:
ThisWorkbook.SaveAs filesavename
---
Regards,
Norman
"JoePro82" wrote in message
oups.com...
I have the following code:
Private Sub CommandButton1_Click()
If OptionButton1 = True _
Or OptionButton2 = True _
Or OptionButton3 = True Then
'ok to save
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Microsoft Excel Workbook (*.xls), *.xls")
Else
MsgBox "Please selecet a 'Project Status' before submitting!" &
vbLf & " FILE NOT SAVED!!"
End If
End Sub
It does everything right (i.e. opening the Save As dialog box or the
Message Box when required) up until the actual saving of the Workbook.
When I click "OK" the dialog box closes without saving, as if I had hit
"Cancel" instead. What am I missing? Thanks in advance for the help!!
|