Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
This Workbook or Worksheets for VBA
Hi all,
I am learning some VBA to make more of Excel. In one book I am told to add all the macros to 'This Workbook' whilst another book has me creating code in separate worksheets as well as 'This Workbook' Is there a proper way to do this as I would like to follow the correct path to having the code run properly. Thanks, Mickey |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
This Workbook or Worksheets for VBA
Mickey,
Generally speaking, the ThisWorkbook module should contain only event procedures for the workbook, and perhaps private procedures in support of those event procedures. Similarly, the Sheet modules should contain only event procedures for that particular sheet. If you don't know what an event procedure is, then don't worry about it and don't put any code at all in these modules. All other code should go in standard code modules, those you insert from the Insert menu in VBA. "Mickey" wrote in message ... Hi all, I am learning some VBA to make more of Excel. In one book I am told to add all the macros to 'This Workbook' whilst another book has me creating code in separate worksheets as well as 'This Workbook' Is there a proper way to do this as I would like to follow the correct path to having the code run properly. Thanks, Mickey |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
This Workbook or Worksheets for VBA
Hi Chip,
Thanks for the reply which makes sense and will be a great help. Mickey |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum for 26 worksheets on one workbook | Excel Worksheet Functions | |||
Combine worksheets in multiple workbook in one workbook with a macro | Excel Discussion (Misc queries) | |||
Create New Workbook from Worksheets in One Workbook | Excel Discussion (Misc queries) | |||
Add 6 worksheets in workbook | New Users to Excel | |||
How do I build a workbook from the worksheets another workbook? | Excel Discussion (Misc queries) |