displaying a builtin dialog box

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top