Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting ctl to array of checkboxes yields type mismatch error.
That worked correctly. Thank you for your time.
Tritan -----Original Message----- There are two types of checkboxes. Do your dim with the MSForms qualification. Dim ChkBoxes() As MSForms.CheckBox Regards, Tom Ogilvy "Tritan" wrote in message ... Dim ChkBoxes() As CheckBox Dim Ctl As Control Dim j As Integer j = 0 For Each Ctl In Me.Controls If TypeName(Ctl) = "CheckBox" Then j = j + 1 ReDim Preserve ChkBoxes(1 To j) error- Set ChkBoxes(j) = Ctl End If Next Ctl have several checkboxes on a user form that I would like to manipulate in a for loop. (setting various ranges differently based on the which checkbox is checked) When I step thru it Ctl is 'true'. I want to add a CheckBox to my array not a true. What am I doing wrong. Any help would be appreciated. Thanks, Tritan . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Type Mismatch Error | Excel Discussion (Misc queries) | |||
Type Mismatch Error - Help Please | Excel Worksheet Functions | |||
Type Mismatch Error | Excel Discussion (Misc queries) | |||
setting ctl to array of checkboxes yields type mismatch error. | Excel Programming |