PC Review


Reply
Thread Tools Rate Thread

How to declare global variable in Excel VBA?

 
 
Sing
Guest
Posts: n/a
 
      23rd Sep 2007
Dear Excel Gurus,

This may sound like a basic question, but I only know C and am new to Excel
VBA

I wish to define a global variable that is accessible to all worksheets. Can
someone advise?

Thanks.


 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      23rd Sep 2007

In a standard/regular module - not a Class module - at the top of the module...

Public Const LNG_LENGTH As Long = 123
-or-
Public lngLength as Long
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Sing"
wrote in message
Dear Excel Gurus,
This may sound like a basic question, but I only know C and am new to Excel
VBA
I wish to define a global variable that is accessible to all worksheets. Can
someone advise?
Thanks.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
where and how to declare global variable in vb2005 ? lokesh kumar Microsoft C# .NET 1 27th Sep 2007 11:37 AM
declare a global variable =?Utf-8?B?cmFmaWs=?= Microsoft Access Macros 1 5th Aug 2005 02:22 AM
How to declare a variable in the global scope? Miguel Dias Moura Microsoft ASP .NET 41 27th Dec 2004 05:56 PM
How to declare variable as Excel constant? John Wirt Microsoft Excel Programming 2 22nd Aug 2004 05:41 PM
how to declare session variable in global.asax file khawar Microsoft ASP .NET 1 10th Jul 2003 09:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:33 PM.