Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Type Mismatch Error Minitman Excel Discussion (Misc queries) 7 June 21st 08 02:15 AM
Type Mismatch Error - Help Please Launchnet Excel Worksheet Functions 5 July 20th 07 04:35 AM
Type Mismatch Error David Excel Discussion (Misc queries) 2 December 11th 05 04:46 PM
setting ctl to array of checkboxes yields type mismatch error. Tritan Excel Programming 0 July 11th 03 07:50 PM


All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"