LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Error after code is run

This is the last bit of code that i run...

Sub chkWkbclose()
'
Dim wkb As Integer

On Error Resume Next
Application.IgnoreRemoteRequests = False
Application.DisplayAlerts = False
Application.ScreenUpdating = True
wkb = Application.Workbooks.Count
If wkb <= 2 Then
Application.Quit
Else
ActiveWorkbook.Close
End If

End Sub

--
Les


"Jim Rech" wrote:

except at the end when i want to close it


Close what? The workbook? Look at your Workbook Before_Close code in the
ThisWorkbook module if so.

--
Jim
"Les" wrote in message
...
| Hi all,
|
| i have code that runs perfectly and does all that i want it do, except at
| the end when i want to close it, i get an error message "Run-Time error
'424'
| Object required".
|
| When i F8 my way through it runs perfectly
|
| it is driving me crazy as i cnnot find the problem !!!
|
| Any help would be welcomed with much happeness.
| --
| Les


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM
OnTime code error "can't execute code in break mode" tskogstrom Excel Programming 1 September 8th 06 10:29 AM
Error in Excel VBA Code (Error 91) dailem Excel Programming 1 August 25th 06 03:45 PM
How can I still go to the error-code after a On Error Goto? Michel[_3_] Excel Programming 2 May 4th 04 04:21 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"