Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Those article sdo help. Thanks.
"Jackpot" wrote: Does these articles help. http://www.ozgrid.com/VBA/variable-scope-lifetime.htm http://www.java2s.com/Code/VBA-Excel...sics/Const.htm "BlairH" wrote: I'm either horribly confused, or old age is taking its toll. But there seems to be too many options for declaring variables and I;m having trouble figuring out the best way for declaring variables. Tell me if I have it straight: variables declared at the top of a module are shared within all procedures in the module, decalred within a procedure/function are available to only that procedure/function variables declared Public are available to all modules - in this workbook only or all workbooks? - so these should be declared at the top of a module? variables declared Static retain their values between procedure/function calls - declare in a procedure/function variables do not retain their values once hte code stops and control returns to the user, so if you want to retain values you need to stor ethem in a cell in the spreadsheet Sound right? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Declaring Variables Twice? | Excel Programming | |||
Declaring variables | Excel Discussion (Misc queries) | |||
Declaring variables | Excel Discussion (Misc queries) | |||
Declaring Variables | Excel Programming | |||
Declaring Variables | Excel Programming |