This is the first time I've ever used a UserForm with Excel (or actually done any coding in VBA for that matter).
I have a UserForm. When I close it, the underlying excel spreadsheet (which is completely blank and used for no other purpose than as a home for the userform) is still displayed on the screen and must be closed as well.
On the userform, I triedBut that didn't do anything.Code:Private Sub UserForm_Deactivate() Workbooks.Close End Sub
Can I cleanly close both when I shutdown the userform?



Reply With Quote


Bookmarks