![]() |
Problem with worksheet_deactivate code
I've got a userform that opens when a sheet is active and is supposed to
close when the same sheet is deactivated. This has worked fine in the past and I was wonder what if anything can be done. what happens now? It opens and closes normally until a button on the form is clicked and the action is performed. After the action is done a message box pops up say that the action is done. Then if you go to a different sheet the userform doesn't unload. I can go back to the sheet that is supposed to have the form and use the form just like normal. It just doesn't unload after that one button has been clicked. Anyone have any ideas? -- JNW |
Problem with worksheet_deactivate code
Do you toggle your events off without reseting them
Application.enableevents = false -- HTH... Jim Thomlinson "JNW" wrote: I've got a userform that opens when a sheet is active and is supposed to close when the same sheet is deactivated. This has worked fine in the past and I was wonder what if anything can be done. what happens now? It opens and closes normally until a button on the form is clicked and the action is performed. After the action is done a message box pops up say that the action is done. Then if you go to a different sheet the userform doesn't unload. I can go back to the sheet that is supposed to have the form and use the form just like normal. It just doesn't unload after that one button has been clicked. Anyone have any ideas? -- JNW |
Problem with worksheet_deactivate code
Thank you Jim! That didn't even cross my mind.
-- JNW "Jim Thomlinson" wrote: Do you toggle your events off without reseting them Application.enableevents = false -- HTH... Jim Thomlinson "JNW" wrote: I've got a userform that opens when a sheet is active and is supposed to close when the same sheet is deactivated. This has worked fine in the past and I was wonder what if anything can be done. what happens now? It opens and closes normally until a button on the form is clicked and the action is performed. After the action is done a message box pops up say that the action is done. Then if you go to a different sheet the userform doesn't unload. I can go back to the sheet that is supposed to have the form and use the form just like normal. It just doesn't unload after that one button has been clicked. Anyone have any ideas? -- JNW |
All times are GMT +1. The time now is 08:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com