J
Jerry Hansen
I am attempting to display Excel's builtin SaveAs dialog box.
The following code displays the Dialog correctly:
Application.Dialogs(xlDialogSaveAs).Show
However, I get an error message "Run time error 1004" after the code
continues to run past this statement and tries to do something that
requires an active worksheet later in the code.
I tried:
Application.Dialogs(xlDialogSaveAs).Show
Application.DisplayStatusBar = True
For x = 1 To 200
Application.StatusBar = "Now at " & x
Next
Application.StatusBar = False
Application.DisplayStatusBar = False
and sure enough, the status bar display updates, and once it's done
"Run time error 1004" proving that the code is not suspending while
waiting for user input. Any ideas of how to suspend my code while it
should be waiting for user input?
The following code displays the Dialog correctly:
Application.Dialogs(xlDialogSaveAs).Show
However, I get an error message "Run time error 1004" after the code
continues to run past this statement and tries to do something that
requires an active worksheet later in the code.
I tried:
Application.Dialogs(xlDialogSaveAs).Show
Application.DisplayStatusBar = True
For x = 1 To 200
Application.StatusBar = "Now at " & x
Next
Application.StatusBar = False
Application.DisplayStatusBar = False
and sure enough, the status bar display updates, and once it's done
"Run time error 1004" proving that the code is not suspending while
waiting for user input. Any ideas of how to suspend my code while it
should be waiting for user input?