Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub UserForm_Initialize()
- Dim cell As Range
- 'Populate NIGO dropdown menu from "DropDownMenus worksheet.
- For Each cell In .Range("B2:B" & .Cells(Rows.Count, 2).End(xlUp).Row)
- If Not IsEmpty(cell) Then NIGOcombobox.AddItem cell.Value
- Next cell
- End With
- Private Sub NIGOcombobox_Change()
- With Worksheets("DropDownMenus")
- .Activate
- Select Case NIGOcombobox
- 'Populate NIGO Reason list by dropdown menu selection.
- Case "AMRF"
- For Each cell In .Range("C3:C" & .Cells(Rows.Count, 3).End(xlUp).Row)
- If Not IsEmpty(cell) Then ListBox1.AddItem cell.Value
- Next cell
- Case "OATS"
- For Each cell In .Range("D3:C" & .Cells(Rows.Count, 3).End(xlUp).Row)
- If Not IsEmpty(cell) Then ListBox1.AddItem cell.Value
- Next cell
- Case Else
- MsgBox "Please select a NIGO Reason"
- End Select
- End With
- End Sub
Add Comment
Please, Sign In to add comment