Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event
Worksheet Change/Calculate Event Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Go Back  Xtreme Visual Basic Talk > > > > Worksheet Change/Calculate Event


Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2018, 08:22 AM
DeepUnderground's Avatar
DeepUnderground DeepUnderground is offline
Centurion
 
Join Date: Jun 2005
Posts: 152
Default Worksheet Change/Calculate Event


I have a worksheet "Sheet2"

I have both Worksheet_Change and Worksheet_Calculate events

What I'm trying to do is "If" the Change Event is triggered... "Then" the code in the Calculate Event does not run.

But what if noticed, is the Calculate Event runs before the Change Event.

Any thoughts?
Reply With Quote
  #2  
Old 02-07-2018, 08:21 PM
Kluz's Avatar
KluzWorksheet Change/Calculate Event Kluz is offline
Sapience.Aquire

Super Moderator
* Expert *
 
Join Date: Oct 2003
Location: Lake Bluff, Ill., U.S.
Posts: 3,467
Default

I would use a module level boolean variable. The calculate event would test it, change it and then Exit Sub the first time, the change event would then run and (maybe) explicitly call the calculate event again. The calculate event would test the boolean variable, see that it was a different value than the first time through and run as usual. As this may trigger the change event, you may need to use a second boolean variable to be tested by the change event that would allow it to run the first time and not the second.
__________________
No the other right mouse click
Reply With Quote
Reply

Tags
calculate, change, code, event, worksheet, change/calculate


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
 
Worksheet Change/Calculate Event
Worksheet Change/Calculate Event
 
-->