TheComputerDude
Programmer
I have 3 control arrays (text box, list box, and combo box)and would like to populate a form in 3 columns. I have never tried to use a control variable before and I am have a problem trying to get it to work. My code is below, if you have any suggestions, please let me know.
Private Sub Form_Load()
Const intSpacing As Integer = 105
Dim intCounter As Integer
Dim ctrlName As Control
For intCounter = 1 To 2
Set ctrlName = lblCoverageType(0)
Load ctrlName(intCounter)
With ctrlName(intCounter)
.Left = ctrlName(intCounter - 1).Left + ctrlName(intCounter - 1).Width + intSpacing
.Visible
End With
If intCounter < 2 Then
End If
Next intCounter
End Sub
Private Sub Form_Load()
Const intSpacing As Integer = 105
Dim intCounter As Integer
Dim ctrlName As Control
For intCounter = 1 To 2
Set ctrlName = lblCoverageType(0)
Load ctrlName(intCounter)
With ctrlName(intCounter)
.Left = ctrlName(intCounter - 1).Left + ctrlName(intCounter - 1).Width + intSpacing
.Visible
End With
If intCounter < 2 Then
End If
Next intCounter
End Sub