LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default "on error resume next" NOT working...

Hi...
I have a macro which at some point deletes a particular worksheet. In case
the worksheet does NOT exist, I have placed an "on error..." command to allow
the macro to keep running... My problem: the code used to work... and now it
doesn't! I get a "subscript out of range" error. Why isn't the "on error"
routine working here? Any suggestions on fixing this? Here's my code:

'if the "Final Report" sheet exists, delete it.
On Error Resume Next
Application.DisplayAlerts = False
Worksheets("Final Report").Delete
Application.DisplayAlerts = True
'more code here...

In another macro, if a given worksheet does NOT exist, my on error routine
is supposed to direct the execution to finish up, etc.... Here, as well, I
get the "subscript out of range" error... Again, the on error is NOT working
to get me past the error...

Any ideas are greatly appreciated!

--
Chris M
 
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
Working out age from "Day" "Month" "Year" timmyc Excel Worksheet Functions 4 February 5th 06 03:07 PM
how to stop "On error resume next" ? Alex St-Pierre Excel Programming 0 February 11th 05 02:03 PM
Problem with "On error resume next" with "custom VLookup" Factivator Excel Programming 3 July 20th 04 04:42 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM
"On Error Resume Next" Question Jim[_26_] Excel Programming 1 September 20th 03 07:38 PM


All times are GMT +1. The time now is 09:33 AM.

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"