Hello All,
I am developing a UserForm in VBA for Excel that allows a user to make a yes/no selection via a radio button which then activates a ComboBox and allows the user to select a number from 1 To 20, which directly makes TextBoxes appear corresponding to the number they select. The problem I am having is I keep getting a runtime error 91 "object variable or With block variable not set". I have a general understanding but only enough to make me dangerous. I would be grateful for input any of you could provide. Thank you.
[vba]If btnNo.Enabled = True Then
Dim ctrl As Control
For mytext = 1 To 20
ctrl = "txtMinBin." & mytxt
ctrl.Visible = False
ctrl = "txtMaxBin." & mytxt
ctrl.Visible = False
ctrl = "lblMassBin." & mytxt
ctrl.Visible = False
Next
End If
End Sub
[/vba]