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...
guitar713
Apr 09, 2024Brass Contributor
I do not get any specific error message. It just stops at this point in the code and says to debug....
HansVogelaar
Apr 09, 2024MVP
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
- guitar713Apr 09, 2024Brass Contributor
HansVogelaar here is a copy of my code... open it up by pressing the ECO button, then goto the select in the URGENCY section, this is where the problems are located.
- HansVogelaarApr 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
- guitar713Apr 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.