Hi all, missing something simple I think but can't work out what!
I have a number of chechboxes on an Excel sheet and need to make them visible or not depending on other parameters. The following works of course:
If tp = "Y" Then 'make all checkboxes invisible
Me.CON1.Visible = False
Else 'make them all visible
Me.CON1.Visible = True
End If
But I have boxes number Con1 to Con10 which I'd like to loop, so have tried as below, what am I missing please?
Dim i As Integer
If tp = "Y" Then 'make all checkboxes invisible
For i = 1 To 10
Me.CON(i).Visible = False
Next i
Else 'make them all visible
For i = 1 To 10
Me.CON(i).Visible = True
Next i
End If
Thanks
Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
I have a number of chechboxes on an Excel sheet and need to make them visible or not depending on other parameters. The following works of course:
If tp = "Y" Then 'make all checkboxes invisible
Me.CON1.Visible = False
Else 'make them all visible
Me.CON1.Visible = True
End If
But I have boxes number Con1 to Con10 which I'd like to loop, so have tried as below, what am I missing please?
Dim i As Integer
If tp = "Y" Then 'make all checkboxes invisible
For i = 1 To 10
Me.CON(i).Visible = False
Next i
Else 'make them all visible
For i = 1 To 10
Me.CON(i).Visible = True
Next i
End If
Thanks
Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....