E
Excel-General
Private Sub ComboBox2_Change()
On testing this macro for the "exit" case when the combo box of the
form reads "exit" it doesn't clear the value, nor does it unload/exit
at least it doens't seem to. I tried it with a click event instead of
change event and it does the same thing. The form just hangs until I
press the red close button and then it goes back to the load script.
On Error Resume Next
Select Case ComboBox2.Value
Case Is = ComboBox2.Value = "All"
cpyAllpatientShts
ComboBox2.Value.Clear
Unload Me
Case Is = ComboBox2.Value = "Exit"
ComboBox2.Value.Clear
Unload Me
Case Is = ComboBox2.Value <> ""
ComboBox2.Value = g_fName
CpySinglePatientSht
ComboBox2.Value.Clear
Unload Me
End Select
On Error GoTo 0
End Sub
On testing this macro for the "exit" case when the combo box of the
form reads "exit" it doesn't clear the value, nor does it unload/exit
at least it doens't seem to. I tried it with a click event instead of
change event and it does the same thing. The form just hangs until I
press the red close button and then it goes back to the load script.
On Error Resume Next
Select Case ComboBox2.Value
Case Is = ComboBox2.Value = "All"
cpyAllpatientShts
ComboBox2.Value.Clear
Unload Me
Case Is = ComboBox2.Value = "Exit"
ComboBox2.Value.Clear
Unload Me
Case Is = ComboBox2.Value <> ""
ComboBox2.Value = g_fName
CpySinglePatientSht
ComboBox2.Value.Clear
Unload Me
End Select
On Error GoTo 0
End Sub