Event sub's left half executed

  • Thread starter Thread starter DS Robinson
  • Start date Start date
D

DS Robinson

Hello,
I'm trying to set validation for a dynamic list, which involves
trapping worksheet_change and worksheet_selectionchange events. The list
of values against which to validate is itself dynamic (based on example
at:http://www.contextures.com/xlDataVal03.html).

The problem is that, when pasting in a set of values to the column where
the dynamic list (to be validated) is made from, and stepping through
(using F8) the resulting worksheet_change call, causes the debugger to
jump around to different UDF's (sometimes right into the middle of them)
called elsewhere in the worksheet. I wouldn't mind this, but when they
finish, control does not return to the worksheet_change sub, leaving it
half executed.

How is this possible?

I can post code if needed, but there would be quite a bit.

Thank you in advance
Dale Robinson
 
Chip said:
Dale,

When you experience erratic code behavior such as you describe,
it means that VBA has screwed itself up. You can usually remedy
this by running Rob Bovey's Code Cleaner, a free add-in at
http://www.appspro.com/Utilities/Utilities.htm .

Thanks for the speedy reply, that will have saved me hours of
frustration. I have been using your website too, which has been very
helpful.

Regards
Dale Robinson
 
Back
Top