R
Robbyn
Greetings all. I think I've been looking at this project too long because I can't figure out why the following code
doesn't work (Being a VBA beginner doesn't help either). The code doesn't do what it's supposed to. If cmb27-3
is not "NA" then cmb32-41 add "lesson" & k. If is "N/A" then disable cmb32-41. But cmb32-41 are disabled every time
What am I not seeing?
BTW, cmb=combobox
Private Sub cmb27_Change(
Dim i As Intege
Dim j As Intege
Dim k As Intege
For i = 27 To 3
For j = 32 To 4
For k = 1 To 2
If Me.Controls("cmb" & i).Text <> "N/A" The
Me.Controls("cmb" & j).AddItem "Lesson" & " " &
Else: Me.Controls("cmb" & j).Enabled = Fals
End I
Next
Next
Next
End Sub
doesn't work (Being a VBA beginner doesn't help either). The code doesn't do what it's supposed to. If cmb27-3
is not "NA" then cmb32-41 add "lesson" & k. If is "N/A" then disable cmb32-41. But cmb32-41 are disabled every time
What am I not seeing?
Private Sub cmb27_Change(
Dim i As Intege
Dim j As Intege
Dim k As Intege
For i = 27 To 3
For j = 32 To 4
For k = 1 To 2
If Me.Controls("cmb" & i).Text <> "N/A" The
Me.Controls("cmb" & j).AddItem "Lesson" & " " &
Else: Me.Controls("cmb" & j).Enabled = Fals
End I
Next
Next
Next
End Sub