Save As Prompt


Posted by Shanna on December 07, 2001 12:11 PM

At the end of one of my macros I want to do a "Save As" but I want excel to open the browse window and allow it to be named at that time then go on to the Next statement in the macro. Can this be done?

Thanks



Posted by More Beer!!! on December 07, 2001 12:31 PM

Here is a macro that will work all by itself. If you want to add it to another, just delete the first and last lines and paste it into your macro...

Sub SaveAs()
'
' SaveAs Macro
' Macro recorded 12/07/2001 by More Beer!!!

Dim ck As Boolean
If newName = "" Then
str1 = "Enter New File Name Here"
Else
str1 = newName
End If
ck = Application.Dialogs(xlDialogSaveAs).Show(str1)
If ck = True Then
newName = ActiveWorkbook.Name
End If
End Sub