Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I assume any public code that is common to the entire workbook. Isn't
"ThisWorkBook" just the same as a user-added module? Please set me straight on the use of "ThisWorkBook" vs Modules. Thanks, Hexman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ThisWorkbook is a class module, specific to workbook events, such as
Workbook_Open. There are also worksheet class modules, where worksheet events are invoked. Code in these modules is usually not accessible from other modules, neither other class modules nor standard code modules. Unlike standard code modules, which have to be explicitly added to a workbook, these class modules automatically get created when a workbook is created, and when sheets are created. -- HTH RP (remove nothere from the email address if mailing direct) "Hexman" wrote in message ... I assume any public code that is common to the entire workbook. Isn't "ThisWorkBook" just the same as a user-added module? Please set me straight on the use of "ThisWorkBook" vs Modules. Thanks, Hexman |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 22 Dec 2005 00:50:30 -0000, "Bob Phillips"
wrote: ThisWorkbook is a class module, specific to workbook events, such as Workbook_Open. There are also worksheet class modules, where worksheet events are invoked. Code in these modules is usually not accessible from other modules, neither other class modules nor standard code modules. Unlike standard code modules, which have to be explicitly added to a workbook, these class modules automatically get created when a workbook is created, and when sheets are created. Thanks for the explanation. Hexman |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Hexman" wrote in message ... I assume any public code that is common to the entire workbook. Isn't "ThisWorkBook" just the same as a user-added module? Please set me straight on the use of "ThisWorkBook" vs Modules. Thanks, Hexman The ThisWorkbook code module is a good place to put menu creation and deletion code and variable initiation code. If you put code like this in the ThisWorkbook code module for your PERSONAL.XLS file, you can load all sorts of customizations and menus when the app starts. The only two events in this module that I currently utilize are the Workbook_Open event the Workbook_Close event. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Wed, 21 Dec 2005 19:46:39 -0600, "42N83W"
wrote: "Hexman" wrote in message .. . I assume any public code that is common to the entire workbook. Isn't "ThisWorkBook" just the same as a user-added module? Please set me straight on the use of "ThisWorkBook" vs Modules. Thanks, Hexman The ThisWorkbook code module is a good place to put menu creation and deletion code and variable initiation code. If you put code like this in the ThisWorkbook code module for your PERSONAL.XLS file, you can load all sorts of customizations and menus when the app starts. The only two events in this module that I currently utilize are the Workbook_Open event the Workbook_Close event. Thanks, Hexman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I type "itis" without Excel putting a space "it is"? | Excel Worksheet Functions | |||
Where is the toolbar with the "bold type", "font type", options | New Users to Excel | |||
How to use VBA to copy this code to "thisworkbook" objects of all opened workbooks ? | Excel Programming |