I have this current code which works find up to the ConveyorPickingCheck.value part - it populates this information but nothing beyond this?
i'm maybe missing something simple but very frustrating, any info would be great
Private Sub ListBox1_Click()
If Me.ListBox1.ListIndex = -1 Then 'not selected
MsgBox " No selection made"
ElseIf Me.ListBox1.ListIndex >= 1 Then 'User has selected
r = Me.ListBox1.ListIndex
With Me
.TextBox1.Value = ListBox1.List(r, 0)
.TextBox3.Value = ListBox1.List(r, 1)
.cmbAmend.Enabled = True 'allow amendment or
.cmbDelete.Enabled = True 'allow record deletion
.cmbAdd.Enabled = False 'don't want duplicate
If ListBox1.List(r, 2) = "Yes" Then
ToteLaunchCheck.Value = True
ElseIf ListBox1.List(r, 2) = "No" Then
ToteLaunchCheck.Value = False
End If
If ListBox1.List(r, 3) = "Yes" Then
ConveyorPickingCheck.Value = True
ElseIf ListBox1.List(r, 3) = "No" Then
ConveyorPickingCheck.Value = False
End If
If ListBox1.List(r, 4) = "Yes" Then
HighlighterCheck.Value = True
ElseIf ListBox1.List(r, 4) = "No" Then
HighlighterCheck.Value = False
End If
If ListBox1.List(r, 5) = "Yes" Then
QualityCheck.Value = True
ElseIf ListBox1.List(r, 5) = "No" Then
QualityCheck.Value = False
End If
If ListBox1.List(r, 6) = "Yes" Then
PrePackCheck.Value = True
ElseIf ListBox1.List(r, 6) = "No" Then
PrePackCheck.Value = False
End If
If ListBox1.List(r, 7) = "Yes" Then
SpecialsCheck.Value = True
ElseIf ListBox1.List(r, 7) = "No" Then
SpecialsCheck.Value = False
End If
If ListBox1.List(r, 8) = "Yes" Then
TeamLeaderCheck.Value = True
ElseIf ListBox1.List(r, 8) = "No" Then
TeamLeaderCheck.Value = False
End If
End With
End If
End Sub
Bookmarks