Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add code to a worksheet programatically
I rarely have to post questions anymore because the use group history
has an answer for just about any question you can think of. But here's one that I need help on. I have a workbook I call "Master.xls" with VBA code which opens & manipulates several other workbooks. One of the things I would like to do in each of the other books is add a Worksheet_Change event to sheets in the workbooks. There are hundreds of them so doing it manually isn't really an option. How can I use VBA to add code to a worksheet module in another open workbook? Thanks a lot gurus. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add code to a worksheet programatically
e.g. let's say the code was:
Sub Worksheet_Change(ByVal Target As Excel.Range) MsgBox Target End Sub (although it's much longer than that) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add code to a worksheet programatically
See www.cpearson.com/excel/vbe.htm for details and examples.
"Dave B" wrote in message oups.com... I rarely have to post questions anymore because the use group history has an answer for just about any question you can think of. But here's one that I need help on. I have a workbook I call "Master.xls" with VBA code which opens & manipulates several other workbooks. One of the things I would like to do in each of the other books is add a Worksheet_Change event to sheets in the workbooks. There are hundreds of them so doing it manually isn't really an option. How can I use VBA to add code to a worksheet module in another open workbook? Thanks a lot gurus. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add a Button Programatically plus code | Excel Discussion (Misc queries) | |||
Delete Code Modules Programatically | Excel Discussion (Misc queries) | |||
Programatically saving workbook (or worksheet) without the code | Excel Programming | |||
Deleting macro code programatically | Excel Programming | |||
Removing VBA Code (programatically) | Excel Programming |