Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public Variable in ThisWorkbook
I want to declare some public variables as soon as I open the workbook. Can
I do that in "ThisWorkbook" or do I need to put it in a module and have "ThisWorkbook" Open event call a routine to set the public variables? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public Variable in ThisWorkbook
If the variables are going to be used in procedures outside the
ThisWorkbook module, you should declare them in the declarations section of a regular code module, and initialize them in the Open event procedure. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "DRKML" wrote in message ... I want to declare some public variables as soon as I open the workbook. Can I do that in "ThisWorkbook" or do I need to put it in a module and have "ThisWorkbook" Open event call a routine to set the public variables? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public Variable in ThisWorkbook
Thank you.
"Chip Pearson" wrote in message ... If the variables are going to be used in procedures outside the ThisWorkbook module, you should declare them in the declarations section of a regular code module, and initialize them in the Open event procedure. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "DRKML" wrote in message ... I want to declare some public variables as soon as I open the workbook. Can I do that in "ThisWorkbook" or do I need to put it in a module and have "ThisWorkbook" Open event call a routine to set the public variables? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Public variable | New Users to Excel | |||
Public variable usage! | Excel Programming | |||
Public Variable | Excel Programming | |||
Use Checkbox Value or Public Variable? | Excel Programming | |||
public variable | Excel Programming |