Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 2
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default 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



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
Strip workbook of macros, VBA, MS Query, etc. Paul Kraemer Excel Discussion (Misc queries) 4 September 7th 06 01:30 PM
Opening Protected EXCEL worksheets to update linked data doctorjones_md Excel Discussion (Misc queries) 8 August 7th 06 10:51 AM
Opening Protected EXCEL worksheets to update linked data doctorjones_md Setting up and Configuration of Excel 9 August 7th 06 10:51 AM
Opening Protected EXCEL worksheets to update linked data doctorjones_md New Users to Excel 9 August 7th 06 10:51 AM
Protecting a worksheet / workbook with macros WLMPilot Excel Discussion (Misc queries) 2 May 30th 06 04:35 PM


All times are GMT +1. The time now is 04:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"