Create a Private Const Array in excel 2000

T

tomfabtastic

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
 
J

Jim Cone

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



<[email protected]>
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
 
T

tomfabtastic

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

<[email protected]>
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top