H
Harry-Wishes
I have designed a form containing 4 textboxes and 4 checkboxes. I would like
to store the textboxes in one array and store the checkboxes in another
array. I successfully did this with the textboxes but had problems with the
checkboxes. I get a Type mismatch Run-time error '13' when I initialize the
array with assignments using the Set command (see below). The code for
storing items in each array are identical so I am at a lost. Is the
assigmnent for checkboxes different in some way? Help greatly welcome.
Thanks!
Harry-Wishes
Option Base 1
Dim chk(4) As CheckBox
Set chk(1) = Acknowledge_Form1.CheckBox1
Set chk(2) = Acknowledge_Form1.CheckBox2
Set chk(3) = Acknowledge_Form1.CheckBox3
Set chk(4) = Acknowledge_Form1.CheckBox4
Dim aTb(4) As TextBox
Set aTb(1) = Acknowledge_Form1.Box1
Set aTb(2) = Acknowledge_Form1.Box2
Set aTb(3) = Acknowledge_Form1.Box3
Set aTb(4) = Acknowledge_Form1.Box4
to store the textboxes in one array and store the checkboxes in another
array. I successfully did this with the textboxes but had problems with the
checkboxes. I get a Type mismatch Run-time error '13' when I initialize the
array with assignments using the Set command (see below). The code for
storing items in each array are identical so I am at a lost. Is the
assigmnent for checkboxes different in some way? Help greatly welcome.
Thanks!
Harry-Wishes
Option Base 1
Dim chk(4) As CheckBox
Set chk(1) = Acknowledge_Form1.CheckBox1
Set chk(2) = Acknowledge_Form1.CheckBox2
Set chk(3) = Acknowledge_Form1.CheckBox3
Set chk(4) = Acknowledge_Form1.CheckBox4
Dim aTb(4) As TextBox
Set aTb(1) = Acknowledge_Form1.Box1
Set aTb(2) = Acknowledge_Form1.Box2
Set aTb(3) = Acknowledge_Form1.Box3
Set aTb(4) = Acknowledge_Form1.Box4