Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
1. There are 2 worksheets (Sheet1 & Sheet2) in an Excel workbook.
2. The given worksheets are similar in that both of them contain AutoFilters and make use of Event-Handlers such as WorkSheet_Calculate (). 3. On Sheet1, it enters into FilterMode after any one of the AutoFilters is activated and consequently, WorkSheet-Calculate() is Triggered. 4. On Sheet2, it enters into FilterMode after any one of the AutoFilters is activated ; however, WorkSheet-Calculate() is NOT Triggered. 5. The question is, Why is that difference between Sheet1 and Sheet2 with respect to Trigger & Non-Trigger of WorkSheet-Calculate() ? 6. Please share your experience. 7. Regards. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I see 2 reasons.
1. Out of the below check where you have written your code. Private Sub Workbook_SheetCalculate(ByVal Sh As Object) 'This Workbook event will be triggered for all sheets End Sub Private Sub Worksheet_Calculate() 'Each individual sheet has got its own Calculate event which will be triggered only for that sheet End Sub 2. Check the sheet reference used in your code. Check whether you have specified ActiveSheet or Sheets(1) or ... If this post helps click Yes --------------- Jacob Skaria " wrote: 1. There are 2 worksheets (Sheet1 & Sheet2) in an Excel workbook. 2. The given worksheets are similar in that both of them contain AutoFilters and make use of Event-Handlers such as WorkSheet_Calculate (). 3. On Sheet1, it enters into FilterMode after any one of the AutoFilters is activated and consequently, WorkSheet-Calculate() is Triggered. 4. On Sheet2, it enters into FilterMode after any one of the AutoFilters is activated ; however, WorkSheet-Calculate() is NOT Triggered. 5. The question is, Why is that difference between Sheet1 and Sheet2 with respect to Trigger & Non-Trigger of WorkSheet-Calculate() ? 6. Please share your experience. 7. Regards. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jacob Skaria, Esq
Thank you very much indeed. Have used ActiveSheet for the "Code-Behind" of Sheet1 & Sheet2. As it turns out, Sheet2 does not execute the on-board "Code-Behind's Worksheet_Calculate()" ; it makes use of Sheet1's "Code-Behind". That's rather Odd indeed. Have not made use of WorkBook's SheetCalculate(). Other lessons learned are that WorkSheet_Calculate()'s could execute one after the other for the WorkSheets' Code-Behind. WorkSheet_Calculate()'s can be rather difficult to handle. Please continue discussion. Regards. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you try a simple formula and calculate in all three sheets it calls the
corresponding WorkSheet_Calculate() May be autofilter is not doing any calculations at all....instead use Selection change or Change event. If you work with Workbook from sh object you can get sh.name or sh.index which gives you the worksheet name or index number If this post helps click Yes --------------- Jacob Skaria " wrote: Jacob Skaria, Esq Thank you very much indeed. Have used ActiveSheet for the "Code-Behind" of Sheet1 & Sheet2. As it turns out, Sheet2 does not execute the on-board "Code-Behind's Worksheet_Calculate()" ; it makes use of Sheet1's "Code-Behind". That's rather Odd indeed. Have not made use of WorkBook's SheetCalculate(). Other lessons learned are that WorkSheet_Calculate()'s could execute one after the other for the WorkSheets' Code-Behind. WorkSheet_Calculate()'s can be rather difficult to handle. Please continue discussion. Regards. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Re : Excel to by-pass Private Sub Worksheet_Calculate() | Excel Programming | |||
Re : Excel Worksheet_Calculate() & Worksheet_Change() | Excel Programming | |||
worksheet_calculate | Excel Programming | |||
FilterMode does not work? Excel 2003/XML | Excel Programming | |||
Worksheet_calculate() | Excel Programming |