Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default 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
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
determine the active workbook containing a specific sheet Valeria Excel Programming 1 September 29th 05 08:21 PM
Worksheet is no longer the active sheet Event Todd Huttenstine Excel Programming 3 May 21st 04 09:16 PM
Worksheet Calculate Event Gustavo[_4_] Excel Programming 2 January 14th 04 09:00 PM
macro to apply worksheet event to active worksheet Paul Simon[_2_] Excel Programming 3 August 7th 03 02:50 AM


All times are GMT +1. The time now is 05:23 AM.

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"