texasalynn
Well-known Member
- Joined
- May 19, 2002
- Messages
- 8,458
I thought this would be something simple, but I'm stuck. Here is what I am trying:
I wanted to assign the checkbox(x) as a variable and then it would loop through the range to see if there is a value. If the range is empty then the checkbox wouldn't show on the userform. I'm I missing something?
Code:
Private Sub UserForm_Initialize()
CBox = "CheckBox"
For i = 1 To 10
Set CBox = CBox & i
If Cells(i, 3).Value <> "" Then
CBox.Caption = Cells(i, 3).Value
Else
CBox.Visible = False
End If
Next
End Sub
I wanted to assign the checkbox(x) as a variable and then it would loop through the range to see if there is a value. If the range is empty then the checkbox wouldn't show on the userform. I'm I missing something?