Thanks all, hope u all well
[code]
Dim i As Integer
Dim textTab As Variant
Dim ctl As Control
Expand|Select|Wrap|Line Numbers
- For i = 0 To 9
- Set ctl = Me.Controls("cmd" & i + 1)
- If i <= UBound(textTab) Then ctl.Caption = textTab(i)
- If i > UBound(textTab) Then ctl.Visible = False
- Next i