ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unload Userform doesn't work here - why? (https://www.excelbanter.com/excel-programming/354141-unload-userform-doesnt-work-here-why.html)

rammieib

Unload Userform doesn't work here - why?
 
In my code, when I open up a new workbook which has a userform splash
screen, the unload userform1 code works tos top it loading up.

However, later on in the coding where I activate to a different
workbook, the unload userform1 doesn't stop the userform from
appearing? Code below.

Workbooks(change).Activate
Unload UserForm1

Any ideas?


Tom Ogilvy

Unload Userform doesn't work here - why?
 
Application.EnableEvents = False
Workbooks(change).Activate
Application.EnableEvents = True

might work better in both cases.

--
Regards,
Tom Ogilvy

"rammieib" wrote in message
ups.com...
In my code, when I open up a new workbook which has a userform splash
screen, the unload userform1 code works tos top it loading up.

However, later on in the coding where I activate to a different
workbook, the unload userform1 doesn't stop the userform from
appearing? Code below.

Workbooks(change).Activate
Unload UserForm1

Any ideas?





All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com