Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Variable in more than one module

What is the best way to define a variable in one module and have it be held
constant in all other modules, fucntions, etc....?

Nick M.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Variable in more than one module

Define it as Public in the declarations section (top; before any subs or
functions) of the module it is in.
--
- K Dales


"Nick M" wrote:

What is the best way to define a variable in one module and have it be held
constant in all other modules, fucntions, etc....?

Nick M.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Variable in more than one module

that did it. Thanks!

"K Dales" wrote:

Define it as Public in the declarations section (top; before any subs or
functions) of the module it is in.
--
- K Dales


"Nick M" wrote:

What is the best way to define a variable in one module and have it be held
constant in all other modules, fucntions, etc....?

Nick M.

Reply
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
STATIC VARIABLE NOT AVAILABLE IN ANOTHER MODULE CAPTGNVR Excel Discussion (Misc queries) 2 February 1st 07 07:30 PM
Assign Value to Module Level Variable monir Excel Programming 21 March 23rd 05 03:05 AM
Variable in event handles can't be used in module?? Jan Grinwis Excel Programming 1 February 25th 05 08:36 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM
module-level variable lifetime Jessie[_2_] Excel Programming 0 July 30th 03 09:31 PM


All times are GMT +1. The time now is 03:37 PM.

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"