Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

the limit of VB

Posted on 1998-11-28
5
Medium Priority
?
144 Views
Last Modified: 2010-08-05
Is VB possible to write a program include an array such that each array represent a pre-designed command button, and when the whole array is counting the indivdual button would be shown in the appropreiate area?
i.e. array counting ... 1,2,3,.....  
command button(1) displaying....
command button(2) displaying....
command button(3) displaying.... and so on. possible?
0
Comment
Question by:makkw102598
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 160 total points
ID: 1447250
Sure you just have to define a control array. You then keep adding new elements as the array grows.

M

0
 
LVL 1

Author Comment

by:makkw102598
ID: 1447251
Thanks for answering.
because my main problem is that I have designed a form which includes command buttons, labels, text, and so on.
But without making 100s of these forms of the same design.
can I put the first design in to the first array, and when the user has entered the number of that forms it is going to be needed then count from 1 to x so that it will generate x number of the same design of forms, hence to be able to store each of these forms into each of those array?
i.e.
storage is  designform1  
user enter 3
designform_1 display...
designform_2 display...
designform_3 display...
myarrayform(1) is designform_1.
myarrayform(2) is designform_2.
myarrayform(3) is designform_3. and so on
if the user enter say.. 30
there will be 30 of these e.g. ..... designform_30 display ........... myarrayform(30) is designform_30........
But I have only design one form.
and it will generate so many forms ( of the exact design) that the user entered. possible if possible.
How should the online of the code be like?
Thanks for helping.

0
 
LVL 1

Author Comment

by:makkw102598
ID: 1447252
Sorry about the ironical phrase  above.
Can I put the first design in to the first array, and when the user has entered the number of that forms he needed, the computer counts from 1 to x so that it will generate x number of the same design of forms, hence to be able to store each of these forms into each of those array?
Possible?
If possible, how should the outline of the code be like?
Is the better English? thanks
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1447253
Why create 100's of more-or-less identical forms? Have *one* form that you use as a template. From a main module load the form into memory and then start filling in the options. You'll only have one form to track that can be as different at you need it to be. 'seed' the form with control arrays that only have one element defined. That way you can add an additional element to the control array and a new button or text box appears. Once you have the entire form updated, *THEN* show it.

M

0
 
LVL 1

Author Comment

by:makkw102598
ID: 1447254
Thanks for your answer.
Is that possible for me to send you the code that I have done so far, thru the email? I don't know how to describe it thru typing.

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question