How can I trigger an unload event of a form, when I change a combobox?
Thanks
Printable View
How can I trigger an unload event of a form, when I change a combobox?
Thanks
In the combo1_click or change events, put this:
Code:Unload Me
This doesn't work
This error is create:
Unload in the change/click or dropdown event of the
combobox doesn 't work. This is not allowed.
Isn't there an other solution?
maybe this isn't the most elegant way but:
Hope it worked :)Code:Private Sub Combo1_click()
'Call our home-made function to Unload the form
Call Unloadme
End Sub
Private Sub Unloadme()
'Really Unload me now :)
Unload Me
End Sub
You should also set the form to nothing.
Code:Unload Me
Set Form1 = Nothing
End