By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

how to find a control array exists or not

P: 145
iam using vb6.0
thanks in advance
its urgent
Jan 31 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 8,127
chek the INDEX property of the controls.

If it is more than 0 then there is a control array.
Jan 31 '08 #2

P: 145
thanks for your reply
by default iam creating 6 control array like this
frmMain.txtSignaturetype1.Text = chkId(2).Caption
frmMain.txtSignatureid1.Text = Mid(chkId(2).Caption, 3, 16)

frmMain.txtSignaturetype2.Text = chkId(2).Caption
frmMain.txtSignatureid2.Text = Mid(chkId(2).Caption, 3, 16)

frmMain.txtSignaturetype3.Text = chkId(3).Caption
frmMain.txtSignatureid3.Text = Mid(chkId(3).Caption, 3, 16)

frmMain.txtSignaturetype4.Text = chkId(4).Caption
frmMain.txtSignatureid4.Text = Mid(chkId(4).Caption, 3, 16)

frmMain.txtSignaturetype5.Text = chkId(5).Caption
frmMain.txtSignatureid5.Text = Mid(chkId(5).Caption, 3, 16)

but some times only two will be created for tht time i should avoid rest of this so i need to check it exists or not
Jan 31 '08 #3

Expert 5K+
P: 8,127
First find out the number of contols in the array and then assign the value to textbox in a loop not by hard coding.
Jan 31 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.