Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine the worksheet that a calculate event gets initiated on when the workbook is not active
I have 2 workbooks thats are linked with a cell reference. I make a
cell change on book1 and a cell in book 2 changes. I want to be able to get the name of the sheet that the calculate event runs on in book2 to hide rows that do not contain values. Currently my code runs on the Worsheet_calculate event but book1 is the active workbook even though the cacluate code that runs is in book2. The problem is that this code looks at book1 cell values to hide or show rows not the cells in book2 on the specific sheet. I dont want to code in the sheet names either as they may and will change and there are many sheet. Basically I am looking to get the name of the sheet that the calculate event is running because of with the workbook not being active. Thanks Scott |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine the worksheet that a calculate event gets initiated on when the workbook is not active
I did find this code to work.
Private Sub Worksheet_Calculate() MsgBox Sheet1.Name End Sub The only thing I had to change "Sheet1" to match the sheet it was on. It works at least. Scott |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine the worksheet that a calculate event gets initiated on when the workbook is not active
Yes, I wo9uld like to be more generic. I will give me.name a try. I
bet it will work. I need to read up more on the "me." 's capabilities and uses. Thanks a bunch. Scott |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
determine the active workbook containing a specific sheet | Excel Programming | |||
Worksheet is no longer the active sheet Event | Excel Programming | |||
Worksheet Calculate Event | Excel Programming | |||
macro to apply worksheet event to active worksheet | Excel Programming |