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: 493
Default How to create module wide 'constant'?

Excel Helper

I am writing some code which consists of circa 10 different procedures
within a module.

I want to be able to refer to an array in each without having to declare it
in each module.

My array is:

ddRWS = Array(4,16,28,40,52,64,76,88,100)

I want to be able to refer to this in each procedure with statements like:

ddRWS(2)
For i = UBound(ddRWS) to UBound(ddRWS)

Can I declare this array once at the top of the module and then refer to it
during proecedures? I have already tried:

Public ddRWS as Variant
ddRWS = Array(4,16,28,40,52,64,76,88,100)

....this didn't work so i tried...

Public ddRWS as Variant
Const = Array(4,16,28,40,52,64,76,88,100)

How can I declare my array and the assocaited values once only at the module
level so that it can be referred to in subsequent procedures?

Regards


Alex
 
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
How to create a chart with wide range of numbers Roxana Charts and Charting in Excel 3 October 16th 08 04:57 PM
How do I make the 1st column constant in viewing a wide spreadshee Greg Excel Worksheet Functions 4 October 4th 06 06:28 PM
How to create a constant total column in Excel? james9662 Excel Worksheet Functions 1 April 25th 06 08:31 PM
Create an add-in from a VB module Wayne_Perth_WA Excel Programming 1 June 2nd 05 09:19 AM
Set module-wide objects? Ed Excel Programming 4 January 24th 05 08:51 PM


All times are GMT +1. The time now is 01: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"