Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Message!!

Status
Not open for further replies.

Rjc8513

Technical User
Feb 12, 2001
140
US
Running Excel 97.

Why am I getting the error message-
"Object required (Error 424)

when running the code Application.Quit?!!!

I have used this code many times before and have
never encountered this error before.

Thanks.

Richard...
 
This may sound stupid but check the spelling of Application in your code.

Object required would suggest that it can't find the application object.

Also is that the line of code that is highlighted in debug mode?
 
Thanks for the response.

Oddly enough if I click "End" or "Debug", Excel
then quits.

Yes, when I stepped thru the code "Application.Quit"
is the line on which the error occurs.

Application IS spelled correctly.

Richard...
 
Is there any code in any of the close events in the workbooks?
 
Nothing in the Close events.

Her are the last few lines of code:

Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.StatusBar = False
Application.Quit

Richard...
 
Which version of Excel are you running?
I assume this code is running from within Excel.

I was able to run the code fine in Excel 97. No problems.

What happens if you take out the Application.Quit line?
 
I found my problem.

I have a series of User Forms/DialogSheets used as
menus. The way my code was branching created the
error.

It works now. Thanks for your help.

Richard...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top