Populating check boxes with variable names

P

Polar cub

I have a 120 check boxes on an Excel worksheet and I don't want to have 120
sets of code to process each. I tried some code that I used to process check
boxes on a form. Is there a way to get this type of logic to work with the
check boxes on an Excel worksheet, it isn't recognizing the
Me(TextControl).Value :

Dim TextControl as string
Dim I as integer
For I = 1 To 120
TextControl = "ChkNum" & Format$(I)
If Me(TextControl).Value = True Then
Call MoveBrandRec(I)
End If
Next I
 
T

TWR

if ActiveWorkbook.Sheets("YourSheet").Shapes(TextControl).Value = True then
Do Something
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top