PC Review


Reply
Thread Tools Rate Thread

Create a Private Const Array in excel 2000

 
 
tomfabtastic@hotmail.com
Guest
Posts: n/a
 
      22nd May 2009
Hi,

Just wondering if it is possible to create a private constant array of
type string in excel 2000.

I want this constant string array to sit at the top of my module and
be used in the subs that follow.

Regards,
Tom

 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      22nd May 2009
This is as close as I can come. It doesn't appear to be very efficient...
'--
Option Explicit
Private Const sNames As String = "Larry,Moe,Curly"

Sub Demo()
MsgBox Split(sNames, ",")(1) 'returns Moe
End Sub

--
Jim Cone
Portland, Oregon USA



<(E-Mail Removed)>
wrote in message
Hi,
Just wondering if it is possible to create a private constant array of
type string in excel 2000.
I want this constant string array to sit at the top of my module and
be used in the subs that follow.
Regards,
Tom

 
Reply With Quote
 
tomfabtastic@hotmail.com
Guest
Posts: n/a
 
      22nd May 2009
On May 22, 1:19*pm, "Jim Cone" <james.cone...@comcast.netxxx> wrote:
> This is as close as I can come. *It doesn't appear to be very efficient....
> '--
> Option Explicit
> Private Const sNames As String = "Larry,Moe,Curly"
>
> Sub Demo()
> * MsgBox Split(sNames, ",")(1) 'returns Moe
> End Sub
>
> --
> Jim Cone
> Portland, Oregon *USA
>
> <tomfabtas...@hotmail.com>
> wrote in message
> Hi,
> Just wondering if it is possible to create a private constant array of
> type string in excel 2000.
> I want this constant string array to sit at the top of my module and
> be used in the subs that follow.
> Regards,
> Tom


Perfect - 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
Const Array =?Utf-8?B?U8O2cmVuX01hcm9kw7ZyZW4=?= Microsoft Excel Programming 3 25th Jan 2007 01:09 PM
Want a const array... Sinex Microsoft C# .NET 3 10th Aug 2005 07:51 PM
Declaring a const array Edward Diener Microsoft C# .NET 2 10th Feb 2005 06:18 PM
VBA: const with array jfp Microsoft Access Form Coding 1 6th Sep 2003 04:51 AM
how do i declare const array? George Ter-Saakov Microsoft ASP .NET 4 22nd Aug 2003 05:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:33 AM.