![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
How do I decare a Global variable that will be available to the entire workbook as a static. I need to procuce a lot of the same sheet with 2 name changes on each one, but the names are used throughout the code. It's easier to change 2 variables than go through the code and do it that way.
|
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi
At the very top of standard module use: Public Const MyNum As Integer = 256 |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Dave "teaches" how to add a public constant, but if you need a variable, use this:
Public MyNum As Integer That will be available to all modules |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|