Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Change in cell disabling events

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

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
Disabling events within an event handler feltra Excel Programming 4 April 8th 07 05:05 AM
Disabling Events: Dangerous? JakeyC Excel Programming 1 October 26th 05 10:12 PM
Disabling Events Patrick Simonds Excel Programming 3 October 5th 05 12:35 PM
Prevent user disabling events JP Farrow Excel Programming 1 September 29th 04 04:49 PM
Disabling Events MWE[_28_] Excel Programming 4 February 6th 04 05:39 AM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"