View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
J Streger J Streger is offline
external usenet poster
 
Posts: 101
Default Change in cell disabling events

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



"J Streger" wrote:

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