Change in cell disabling events

J

J Streger

I have a worksheet that has two events, shown below:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Not StartEvent Then Exit Sub

WBSFinalWorksheetChange Target

EndEvent

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Force a calculation
Application.Calculate

End Sub

The SelectionChange event has the calc so that a custom function updates
that's based on the current selection. The worksheet change event has a
startevent and endevent function, which turns off and on screenupdating,
interactivity, calculations, and events, respectively. My problem is that I
make sure events are on, then select a cell (firing off the selection change
event) and then change the value of the cell. Events turn to false. No code
is run (I have a breakpoint on both events) and I have breakpointed every
place I set the enableevent property in my code and non of those lines run.
Somehow events are turning off just by me changing a value on a sheet and I
have no idea why. Any ideas?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003
 
J

J Streger

I found out my problem. Kind of.

it seems that the code is NOT stopping at the breakpoints and is still
running (as I dropped msgboxes into the code). So why would the code no
longer stop at breakpoints that I place?

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top