|
-
Jan 2nd, 2000, 05:47 PM
#1
Thread Starter
Junior Member
I am using VB6.0 (SP3).Can any one tell whether I have to give same Name to the Control Array Elements in a Menu Control Array? Is it wrong if I give different Names to the Array Elements?
-
Jan 2nd, 2000, 05:54 PM
#2
Hyperactive Member
An array is in general "something" you refer to with the same name, only an index number that is diffent.
eg.
Dim myarray() As String
myarray(1) = "..."
myarray(2) = "......"
Text1(1).Text = "1"
Text1(2).Text = "2"
So, to create an array of menuitems, they have to have the same name. And, I think they have to be in the same menu either (not sure since I almost never create a menu-array)
-
Jan 3rd, 2000, 01:08 AM
#3
Guru
DO NOT use different names in a control array, that will defeat the purpose of creating it!
You can't code for an event where different commands have different names. If you want to do that, you are unnecessarily giving each different item an index, and you will only give yourself more of a headache trying to match up the index with the control name when you are coding.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|