Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2002, WinXP
I have a sheet with many formulas. That sheet will calculate whenever the file is opened. That will trigger the Worksheet_Calculate macro that I have, and that is the beginning of my problem. The macro consists of one line: Private Sub Worksheet_Calculate() If ActiveSheet.Name < Range("AA1").Value Then Call MyMacro End Sub My problem is that MyMacro is being called at times when I'm not expecting it. I believe that what is happening is that specific sheet is automatically calculating, like at opening of the file, when that sheet is not the ActiveSheet. That causes the call to MyMacro. I need to copy this code on to many other sheet modules, so I don't want to use the name of the sheet. Question. How can I code the above event macro so that the code will look at only the name of the sheet and the contents of cell AA1 of the sheet in which the code is written? For your info, I am trying to prevent anyone from changing the sheet name of any of these sheets. Right now this code is in only one of those sheets. Thanks for your help. Otto |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
worksheet_calculate | Excel Discussion (Misc queries) | |||
worksheet_calculate | Excel Discussion (Misc queries) | |||
A procedure should run when one cell switch between false/true - but not with worksheet_calculate or change event... | Excel Programming | |||
dynamically changing chart y axis using spin buttons and worksheet_calculate event | Excel Programming | |||
worksheet_calculate **help** | Excel Programming |