Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Create a Private Const Array in excel 2000

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Create a Private Const Array in excel 2000

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




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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Create a Private Const Array in excel 2000

On May 22, 1:19*pm, "Jim Cone" 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


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
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
Improve method of calling a private function in a private module XP Excel Programming 1 April 30th 08 06:41 PM
Const Array Sören_Marodören Excel Programming 3 January 25th 07 01:09 PM
excel 2000 - array formulas cdsta Excel Worksheet Functions 14 October 19th 06 10:34 PM
Create macro to download access 2000 table to excel 2000 spreadsheet Tushar[_2_] Excel Programming 3 October 21st 04 02:44 PM
crash changing const to public const BrianB Excel Programming 0 August 4th 03 10:13 AM


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