Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Trapping errors

Hi,
I have a sheet with some controls. If a debug situation occurs I
don't want the user to flung into vba land. A calming MsgBox with some
advice to do something or other would be less traumatic. Does anyone
have some code for this please.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Trapping errors

Lots of times, you can just turn off error checking, do the thing that may cause
an error, then check for an error, and turn error checking back on.

On error resume next
'some code that could cause an error
if err.number < 0 then
err.clear
msgbox "Don't Panic"
'more code???
end if
on error goto 0




ssemtaf wrote:

Hi,
I have a sheet with some controls. If a debug situation occurs I
don't want the user to flung into vba land. A calming MsgBox with some
advice to do something or other would be less traumatic. Does anyone
have some code for this please.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Trapping errors

I have some notes about how to implement error handling at
http://www.cpearson.com/Excel/ErrorHandling.htm

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Mon, 27 Oct 2008 09:51:31 -0700 (PDT), ssemtaf
wrote:

Hi,
I have a sheet with some controls. If a debug situation occurs I
don't want the user to flung into vba land. A calming MsgBox with some
advice to do something or other would be less traumatic. Does anyone
have some code for this please.

Reply
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
Trapping errors in a VLOOKUP function Blue Max Excel Worksheet Functions 1 April 26th 09 03:03 AM
Trapping errors with Conditional Formatting Sandusky Excel Discussion (Misc queries) 3 January 6th 09 08:52 PM
GetOpenFilename - Trapping Errors Tim Childs Excel Programming 5 April 9th 06 03:58 PM
Trapping Workbook OPEN errors sclark Excel Programming 1 January 18th 04 11:12 PM
annoying bell when trapping errors Mika Excel Programming 0 November 7th 03 10:41 AM


All times are GMT +1. The time now is 01:34 AM.

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

About Us

"It's about Microsoft Excel"