UserForm Label Caption

GRCArizona

Board Regular
Joined
Apr 24, 2010
Messages
95
Hi -

I've got a UF that has a label. The default label caption is a date (Jan 1, 2012). Using the Initialize event, I'm running some code that checks for a value on a worksheet. If the code finds the value, the Label.Caption changes to Feb 1, 2012. I can see this change while I'm running my UserForm and it appears to working correctly, but once I close the UF, and go back into VBA, the Caption property still has Jan 1, 2012.

does anyone know why the Caption Property is not changing / saving?

BTW, I'm using Unload Me on a commandbutton to close the UF.

thanks,

GRC
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
The way I understand it, the .Caption (and indeed all the properties) has a "default" value that you set within VBA and then any changes need to be made via Subs / Functions once the form is active. Once you unload the form, the information would revert back to the "default" information.

That's how it's always been for me at any rate although - I think it's standard because it'd be quite frustrating to change the default values of something back if you inadvertently changed them via Subs to begin with without realising it.
 
Upvote 0

Forum statistics

Threads
1,223,277
Messages
6,171,149
Members
452,382
Latest member
RonChand

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