Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Userform questions -- code included!

the code is interpreted and executed sequentially.

If you put nothing in to prevent it, after running the regular code, it
would next enter and execute the error handling code (sounds like your
situation).

Most do this to avoid that

On error goto NoCells

' regular code that could raise an error

Exit sub
NoCells:
' error handling code

End Sub

So if there is not error, the NoCells section is never entered because of
the Exit sub.

--
Regards,
Tom Ogilvy


"Ray" wrote:

Thanks Tom .... your suggestions worked great! One follow-up question
(in the name of learning) -- my initial modification didn't take the
error-handling line out of the Userform code and when I tested the
code (without 'errors' in the data), the msgbox created by the error-
handling popped up anyway! Why would that have happened?

Susan -- your suggestions are very useful as well, especially from an
implementation standpoint! Your response is going into my 'code
archive' ...

Regards//Ray



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
code modules included in sheet count? mark Excel Programming 6 June 5th 07 05:28 PM
how do i change or make this macro??? pictures and code included dispelthemyth Excel Programming 1 March 17th 06 01:56 PM
how do i change or make this macro??? pictures and code included dispelthemyth Charts and Charting in Excel 0 March 17th 06 01:02 AM
Run-time error '9' ---- Code to fix included. [email protected] Excel Programming 3 September 2nd 05 02:48 PM
Require extra funtionality - existing code included Hilton Excel Programming 0 October 7th 04 02:57 PM


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