Hello,
I have a few Modules that my UserForm calls in the ComboBox, however I am wondering if there's a way I can have the UserForm to close when the code is completed. I have tried inserting
at the end of each of my Modules that the ComboBox calls and it did in fact hide the the UserForm but when I would open the UserForm back up it would keep my previous selection already there and therefor would require me to have to close out and open again to have the selections blank.
If you have any suggestions/updates or even a different route than what I am currently attempting, I am open ears!
Here is my current code for my UserForm:
I have a few Modules that my UserForm calls in the ComboBox, however I am wondering if there's a way I can have the UserForm to close when the code is completed. I have tried inserting
VBA Code:
UserForm.Hide
If you have any suggestions/updates or even a different route than what I am currently attempting, I am open ears!
Here is my current code for my UserForm:
VBA Code:
Private Sub UserForm_Initialize()
ComboBox.AddItem "Insert Rows"
ComboBox.AddItem "Priors Prep"
ComboBox.AddItem "Submit Priors"
ComboBox.AddItem "Pricing"
ComboBox.AddItem "Regular CS"
End Sub
Private Sub ComboBox_Change()
If ComboBox.Value = "Priors Prep" Then
Call PriorsPrep
ElseIf ComboBox.Value = "Submit Priors" Then
Call SubmitPriors
ElseIf ComboBox.Value = "Pricing" Then
Call Pricing
ElseIf ComboBox.Value = "Insert Rows" Then
Call InsertRows
ElseIf ComboBox.Value = "Regular CS" Then
Call RegularCS
End If
End Sub