I was given the following code and when I added it to my project, it did not work as expected. It was suppose to open up a "save as" box and save only the current active workbook. For some reason it opens a "save as" box and saves a single worksheet, but the saved worksheet does not contain any of the data from the active worksheet. I've tried to tweak it to get it to work as I need, but no luck. Any ideas?
Sub Macro1()
Dim fileSaveName
fileSaveName = Application.GetSaveAsFilename("Excel Files (*.xl*), *.xl")
If fileSaveName = False Then
MsgBox "No name selected"
Exit Sub
End If
Application.ScreenUpdating = False
ThisWorkbook.ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:=fileSaveName, FileFormat:=xlNormal
ActiveWorkbook.Close
Application.ScreenUpdating = True
End Sub
Bookmarks