Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default How to declare global variable in Excel VBA?

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default How to declare global variable in Excel VBA?


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
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
Global Variable in Excel VBA loopoo[_23_] Excel Programming 4 December 15th 05 11:11 AM
Global array declare Souris Excel Programming 3 August 20th 05 11:38 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Global Variable -- Excel / VBA Adam1 Chicago Excel Discussion (Misc queries) 3 February 23rd 05 12:03 AM
How to declare variable as Excel constant? John Wirt[_6_] Excel Programming 2 August 22nd 04 05:41 PM


All times are GMT +1. The time now is 01:51 AM.

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

About Us

"It's about Microsoft Excel"