![]() |
Code doesn't work from in Office 2003
The following code worked fine in office xp but not in 2003 Private Sub Worksheet_Calculate() Application.EnableEvents = True Run ("SelectAfter") Application.EnableEvents = True End Sub The problem is when I tried to unhide rows in the sheet, the marco "SelectAfter" runs. And I only need it runs when somethng changed in PVT. It worked fine in XP version but above situiation happened after I changed to 2003. The marco SelectAfter means to hide 2 rows after select other items in PVT. Can someone help? -- Dennis Cheung |
Code doesn't work from in Office 2003
Thanks Jacob. After following your code, The marco didn't run when I unhide rows. But it didn't run after slecting other item in Pivot Table. -- Dennis Cheung "Jacob Skaria" wrote: Private Sub Worksheet_Calculate() Application.EnableEvents = False 'your code Application.EnableEvents = True End Sub If this post helps click Yes --------------- Jacob Skaria "Dennis Cheung" wrote: The following code worked fine in office xp but not in 2003 Private Sub Worksheet_Calculate() Application.EnableEvents = True Run ("SelectAfter") Application.EnableEvents = True End Sub The problem is when I tried to unhide rows in the sheet, the marco "SelectAfter" runs. And I only need it runs when somethng changed in PVT. It worked fine in XP version but above situiation happened after I changed to 2003. The marco SelectAfter means to hide 2 rows after select other items in PVT. Can someone help? -- Dennis Cheung |
Code doesn't work from in Office 2003
Thanks Jacob. After following your code, the marco didn't run after unhiding rows. But it didn't run after selecting other items in pivot table. -- Dennis Cheung "Jacob Skaria" wrote: Private Sub Worksheet_Calculate() Application.EnableEvents = False 'your code Application.EnableEvents = True End Sub If this post helps click Yes --------------- Jacob Skaria "Dennis Cheung" wrote: The following code worked fine in office xp but not in 2003 Private Sub Worksheet_Calculate() Application.EnableEvents = True Run ("SelectAfter") Application.EnableEvents = True End Sub The problem is when I tried to unhide rows in the sheet, the marco "SelectAfter" runs. And I only need it runs when somethng changed in PVT. It worked fine in XP version but above situiation happened after I changed to 2003. The marco SelectAfter means to hide 2 rows after select other items in PVT. Can someone help? -- Dennis Cheung |
All times are GMT +1. The time now is 03:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com