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: 77
Default Error Handling question

How do I display a message box if an error occurs and stop the error too? I
want to skip/stop an error if a user enters in a wrong 'ssn' from a 'ssn
combobox', and have a message pop up "ssn is not listed" in lieu of
'end..debug'. I am sure this is possible, but I am at best an experienced
'newbie'.

Example: I have a user form in which a user can select from a 'ssn combobox'
an ssn. Also the user can tab into the 'ssn combobox', and type the
appropriate numbers. The problem is if the user types in a 'ssn' that is not
in a database (hidden worksheet) which a macro is indexing-matching, then I
get an error message 'end..debug'.

What I've done thus far: I have used 'on error resume...', which works fine.
But I can't figure out how to get a message box to pop up and tell the user
"ssn isn't listed". And I played with the combobox properties and changed the
style to 'dropdownlist', but I found through testing that if I type '123'
wait a couple seconds and then type some more numbers '456', the selection
starts with the next number I typed (all ssns that start with 456, instead of
123456). So I changed the style back to 'dropdowncombo'.

End state: What I would like is that when the user enters a ssn that isn't
listed, a message box is displayed "ssn isn't listed", and for the error to
be skipped/stoppeed, as I don't want the user to get into the vba.

Please help.
 
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
Error Handling - On Error GoTo doesn't trap error successfully David Excel Programming 9 February 16th 06 05:59 PM
question error handling Pierre via OfficeKB.com[_2_] Excel Programming 3 November 7th 05 09:39 PM
Error Handling Dave M. Excel Programming 1 August 31st 05 07:15 PM
Error Handling Billy Boone Excel Programming 1 July 1st 05 02:21 PM
Error handling with a handling routine ben Excel Programming 0 March 15th 05 03:01 PM


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