LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Use a variable anywhere in the workbook - How to create?

I want to use a few variables in any Module I run in the current Workbook
without having to enter a Dim/Set command. These variables hold a value that
does not change via the program. If a change is needed I would like to go to
one place to update them. As well, I would like to give their value in the
same place.

I also know that they need to go on the top above any SUB() statement but I
am uncertain which Module they belong in so that all other modules can
benefit from their value. I have Worksheet Sheet Modules and I see a folder
with MODULES.
When I open this up, I have Module1-3. I figured these need to go in one of
these Modules but am uncertain is it matters which one.

I also am uncertain of the exact syntax I need to use to enter this type of
variable.

Each of these variables are currently define in the SUB() as follows:

Dim srcProgramDataInputWs As Worksheet
Dim srcProgramSummaryWs As Worksheet
Set srcProgramDataInputWs = Sheets("ProgramDataInput")
Set srcProgramSummaryWs = Sheets("ProgramSummary")
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a Random Variable [email protected] Excel Discussion (Misc queries) 3 August 25th 09 09:18 AM
create new variable Angie Excel Worksheet Functions 4 January 23rd 07 08:26 PM
how to create a three variable chart. [email protected] Charts and Charting in Excel 2 May 24th 06 12:28 AM
How to create a variable from a calculation achidsey Excel Programming 2 September 25th 05 08:03 AM
VBA code to create "variable" worksheets within a workbook Chris Excel Programming 1 September 14th 05 02:08 AM


All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"