Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Difference among Module, SheetX, ThisWorkbook?
Hi,
Have been using VBA for a while but I only write code in modules, wondering what's the difference among them. Is code in Sheet1 only effective for sheet 1 or is it Worksheet level function, etc.? Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Difference among Module, SheetX, ThisWorkbook?
Code in worksheet1 tends to be event code that is driven by events on that
sheet. You can add other code, but in general, it would only be for code associated with those events. Similarly, Thisworkbook handles workbook events. Standard modules tend to be where you would create the more general code, or even code that might be accessed by some event on more than one worksheet. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "muster" wrote in message oups.com... Hi, Have been using VBA for a while but I only write code in modules, wondering what's the difference among them. Is code in Sheet1 only effective for sheet 1 or is it Worksheet level function, etc.? Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbook_Open in ThisWorkbook.module | Excel Discussion (Misc queries) | |||
Can I add code to ThisWorkbook module with VBA extensibility? | Excel Programming | |||
Calls from sheet module to ThisWorkbook module | Excel Programming | |||
How to use: ThisWorkbook module | Excel Programming | |||
ThisWorkbook module question | Excel Programming |