User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 423,085 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,356 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 253 | Replies: 2
Reply
Join Date: Jul 2008
Posts: 3
Reputation: hartoksi is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hartoksi hartoksi is offline Offline
Newbie Poster

Prevalued arrays in module declaration section

  #1  
Jul 24th, 2008
I've searched all contents of Daiweb and found similar topics but not exactly good on me.

I'm trying to build a activex DLL without any form. This DLL will be used by others as a function library about a specific purpose for "color matching".

I wish to declare an array with preloaded values in module declaration section.

I know only one way to declare an array:

Public A10Wx
A10Wx = Array(1,2,3,4,5,6)

But this way works only in a function. This means that, the array will be active only when function run. My aim is to put values into array at startup.

Thanks in advance for the repliers.

Regards,
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Location: Sivakasi, Tamilnadu, India
Posts: 453
Reputation: selvaganapathy is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 78
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Posting Pro in Training

Re: Prevalued arrays in module declaration section

  #2  
Jul 24th, 2008
I think no way. VB6 Doesnot provide a way to initialize array (as in other languages)
KSG
Reply With Quote  
Join Date: Jul 2008
Posts: 31
Reputation: Teropod is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 6
Teropod Teropod is offline Offline
Light Poster

Re: Prevalued arrays in module declaration section

  #3  
Jul 25th, 2008
Hmmmm.

Try with public array() as something
and later redim array(1d, 2d, 3d, ..., nd)
and then fill it up.

Hope these will help.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 5:49 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC