![]() |
Worksheet Macros for All Worksheets in a Workbook?
Hi,
I have written a group of worksheet macros (things like Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)). I would like these macros to apply to all sheets in the workbook, including ones that are addded later. How do I do this? Thanks, Andrew |
Worksheet Macros for All Worksheets in a Workbook?
Hi Bob
There is a Change event for example in each worksheet module but if you go to the thisworkbook module there is a event called Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) End Sub This will run on very change in all worksheets -- Regards Ron de Bruin http://www.rondebruin.nl "Bob" wrote in message oups.com... Hi, I have written a group of worksheet macros (things like Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)). I would like these macros to apply to all sheets in the workbook, including ones that are addded later. How do I do this? Thanks, Andrew |
All times are GMT +1. The time now is 05:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com