I have a form (frm_ProcessPrelimData) that has a combo box, where the User can select "Yes". If they select "Yes", another form (frm_NewSeller) pops up. When this form closes, I want the frm_ProcessPrelimData to pop back up. The correct form is popping up, but the combo box is still set to "Yes", even though the Initialize procedure should be setting it "No". I'm thinking that's the source of my issue, which is that Excel starts spinning. I can't even CTRL+Break out of it.
frm_ProcessPrelimData code
frm_NewSeller code
frm_ProcessPrelimData code
Code:
Private Sub cmd_Close_Click()
Unload Me
End Sub
Private Sub cobo_NewSeller_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Me.cobo_NewSeller = "Yes" Then
Me.cobo_NewSeller = "No"
frm_NewSeller.Show
Else
Exit Sub
End If
End Sub
Private Sub UserForm_Initialize()
Application.ScreenUpdating = False
Dim cSeller, cYN As Range
Dim rws3 As Worksheet
Set rws3 = ThisWorkbook.Sheets("Variables")
On Error Resume Next
For Each cSeller In rws3.Range("Seller")
With Me.cobo_Seller
.AddItem cSeller.Value
End With
Next cSeller
On Error Resume Next
For Each cYN In rws3.Range("YN")
With Me.cobo_NewSeller
.AddItem cYN.Value
End With
Next cYN
Me.cobo_NewSeller = "No"
Application.ScreenUpdating = True
End Sub
frm_NewSeller code
Code:
Private Sub cmd_Close_Click()
Unload Me
frm_ProcessPrelimData.Show
End Sub