Userform initialization trigger an Exit event?

birdieman

Well-known Member
Joined
Jan 13, 2016
Messages
551
I should know this but my brain is currently frozen.

Does the loading/writing of data from a spreadsheet to userform textboxes during the userform initialization trigger Exit events?

thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I should know this but my brain is currently frozen.

Does the loading/writing of data from a spreadsheet to userform textboxes during the userform initialization trigger Exit events?

thanks

If you mean Worksheet_Deactivate event, the answer is no. The UserForm is a separate platform and loading or unloading it does not normally affect the worksheet events, except that the code in the initialize event of the UF might cause changes or remove focus from a control, in which case the Exit event could occur.
 
Upvote 0
No, I do not mean worksheet deactivate. If I have an _Exit event on a userform textbox and I read a value into that textbox from the spreadsheet in userform_initialization, will the Exit event fire/trigger?
 
Upvote 0
Also, there's one other thing you may want to keep in mind. If a textbox has focus and you unload the userform, the Exit event for that textbox gets triggered. So, depending on what you have, you may want or need to add code accordingly.
 
Upvote 0
The most reliable way to find out what events are firing on start-up is to put a breakpoint at the .Show command and step through the code.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top