C
Chris A
I use a few forms and i'm finding i have to cyle through controls, i've
given it a go and can't seem to find what i need, this works but again, i
have a feeling it's not quite right.
Sub Fill()
Dim Tx As String
Dim rw As Long
For rw = 25 To 35
With Worksheets("Sheet1").Cells(rw, 61)
If .Value = "" Then
Else
Tx = .Value
ComboBox1.AddItem Tx
End If
End With
With Worksheets("Sheet1").Cells(rw, 62)
If .Value = "" Then
Else
Tx = .Value
ComboBox2.AddItem Tx
End If
End With
With Worksheets("Sheet1").Cells(rw, 63)
If .Value = "" Then
Else
Tx = .Value
ComboBox3.AddItem Tx
End If
End With
' <...snip... This repeats quite a bit, >
With Worksheets("Sheet1").Cells(rw, 72)
If .Value = "" Then
Else
Tx = .Value
ComboBox12.AddItem Tx
End If
End With
Next rw
End Sub
Thanks for looking
ChrisA
given it a go and can't seem to find what i need, this works but again, i
have a feeling it's not quite right.
Sub Fill()
Dim Tx As String
Dim rw As Long
For rw = 25 To 35
With Worksheets("Sheet1").Cells(rw, 61)
If .Value = "" Then
Else
Tx = .Value
ComboBox1.AddItem Tx
End If
End With
With Worksheets("Sheet1").Cells(rw, 62)
If .Value = "" Then
Else
Tx = .Value
ComboBox2.AddItem Tx
End If
End With
With Worksheets("Sheet1").Cells(rw, 63)
If .Value = "" Then
Else
Tx = .Value
ComboBox3.AddItem Tx
End If
End With
' <...snip... This repeats quite a bit, >
With Worksheets("Sheet1").Cells(rw, 72)
If .Value = "" Then
Else
Tx = .Value
ComboBox12.AddItem Tx
End If
End With
Next rw
End Sub
Thanks for looking
ChrisA