What first - sheet_change, calculate,selection, etc.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Whose on First!!!
In Sheets VBA windows you can select all of the different code options (i.e.
change, calculate, selection, etc.)
What code section (SUB)is executed first?
Why does it go in circles. At the end one SUB the execution jumps into the
middle of another SUB?
Any ideas haven't seen anything written on this before.

TIA
 
Thanks JE that was a good link and I'll download Chip's example event code.
Another quick question is I have worksheet_calculate code in Sheet2. When I
change a cell in Sheet3 why does Sheet2 "calculate' code execute. I thought
each sheet was it's own code. sheet 3 would not affect Sheet2.
The Sheet2 SUB is coded Private.
TIA
 
It shouldn't unless Sheet2 and Sheet3 are linked so that a change in
Sheet3 causes a calculation event in sheet2 (e.g., a cell in Sheet2 has
=Sheet3!A1 as its formula).
 
Tom Rudski said:
Thanks JE that was a good link and I'll download Chip's example event code.
Another quick question is I have worksheet_calculate code in Sheet2. When I
change a cell in Sheet3 why does Sheet2 "calculate' code execute. I thought
each sheet was it's own code. sheet 3 would not affect Sheet2.
The Sheet2 SUB is coded Private.
TIA

Is your application set to calculate automatically?
If so sat to manual and only that sheet will calculate when the event is fired.

-Pete
 

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

Back
Top