Forum Discussion
guitar713
Apr 09, 2024Brass Contributor
Combo Box dynamic code not working
Hello, I have tried to use a code that works in one program but not another program to dynamicly populate comboboxes. Can someone help me resolve this. The code is as follows: With frmDataEntry...
HansVogelaar
Apr 09, 2024MVP
Try this:
Private Sub cmbURGENCY_Change()
Select Case cmbURGENCY
Case "HAND CARRY - HIGH – 1 Bus Days"
FrameURGENCYOVERALL.BackColor = RGB(245, 99, 75)
Sheet4.Range("C2", Sheet4.Range("C" & Rows.Count).End(xlUp)).Name = "Dynamic"
Case "FAST - MEDIUM – 2-3 Bus Days"
FrameURGENCYOVERALL.BackColor = RGB(255, 251, 0)
Sheet4.Range("D2", Sheet4.Range("D" & Rows.Count).End(xlUp)).Name = "Dynamic"
Case "NORMAL - LOW – 5 Bus Days"
FrameURGENCYOVERALL.BackColor = RGB(155, 247, 141)
Sheet4.Range("E2", Sheet4.Range("E" & Rows.Count).End(xlUp)).Name = "Dynamic"
Case Else
FrameURGENCYOVERALL.BackColor = vbWhite
Sheet4.Range("F2", Sheet4.Range("F" & Rows.Count).End(xlUp)).Name = "Dynamic"
End Select
Me.cmbCARRYREASON.RowSource = "Dynamic"
cmbCARRYREASON.ListIndex = 0
End Sub
guitar713
Apr 09, 2024Brass Contributor
HansVogelaar I thought I had it working, then is crashed again. This program seems buggy. It crashed after I saved a copy of the file.
- HansVogelaarApr 09, 2024MVP
When does it crash? I couldn't reproduce the crash in a quick test.
- guitar713Apr 09, 2024Brass Contributorwhen I first open it up and hit the ECO button
I- HansVogelaarApr 09, 2024MVP
I see. The problem doesn't occur if you leave the workbook visible. Would that be OK?