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: 573
Default Replace debug error box

I'm creating a series of spreadsheets for basic XL users. To make it
simple, I've recorded macros to filter for specific sets of data they
want to see. Then creatd buttons on the spreadsheet to activate those
filters. All this works great.
I also created a "Show All" macro and button, to remove the filter and
show all records. The problem is, if I click "Show All", and all the
records are already showing, I get the macro debug screen. I want this
to be as simple and foolproof as possible. I know someone sooner or
later will click "debug", end up in the VBA editor, and somehow hose up
the code! How do I prevent the debug screen from popping up, and
replace it with a message box saying "All records are displayed" with
an OK button? I tried looking in other threads for the answer, but the
only one I found that applied was:

On Error GoTo Handler
Handler:
MsgBox "All Data is Displayes"

but the message box shows every time you press the button, not just
when the error occurs. How to I get the Message box to only appear when
the debug error occurs?

 
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
Debug Error Ed Davis Excel Discussion (Misc queries) 7 June 16th 09 03:10 PM
Debug Error Ed Davis Excel Discussion (Misc queries) 0 June 16th 09 09:59 AM
Debug Error Saxman Excel Discussion (Misc queries) 3 August 11th 08 12:42 PM
down with the debug error hurlbut777 Excel Programming 1 January 8th 05 12:08 AM
Debug Error Todd Huttenstine[_2_] Excel Programming 3 December 26th 03 11:46 PM


All times are GMT +1. The time now is 10:22 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"