Solved

the limit of VB

Posted on 1998-11-28
5
137 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 80 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

786 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