ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Initialize event doesn't work (https://www.excelbanter.com/excel-programming/298788-initialize-event-doesnt-work.html)

Pop

Initialize event doesn't work
 
Dear all
I have create a form A and in the initialize event I have write some codes in it
But when I load the form second times, it seem that those code didn't work anymore
What happen is that I click the terminate button(the X button on the top right corrner) on form A and load & show form B, from form B I load form A again and all the controls in form A didn't works anymore

How to disable the terminate button on a form?

Rob Bovey

Initialize event doesn't work
 
Hi Pop,

The Initialize event only fires one time, when the UserForm is first
created. If you hide and then re-show the UserForm and you want to run some
code, you should use the Activate event instead. This event will fire
whenever the UserForm is displayed from a hidden state.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Pop" wrote in message
...
Dear all,
I have create a form A and in the initialize event I have write some codes

in it.
But when I load the form second times, it seem that those code didn't work

anymore.
What happen is that I click the terminate button(the X button on the top

right corrner) on form A and load & show form B, from form B I load form A
again and all the controls in form A didn't works anymore.

How to disable the terminate button on a form?





All times are GMT +1. The time now is 03:02 PM.

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