Caption on UserForm only setting in Subclass

I

ion

Hiya.
The Caption property seems to not refer to my windowtitle if I cast my
userform to the UserForm interface. Is that clear? When I go
function example(smork as UserForm)
dim bulb as frmMine
smork.caption = "Floom" ' writes 'Floom' in Title Bar
set bulb = smork
bulb.caption = "But, I'm on the form itself!" ' writes on the form body
end function

What's up with this? I'd like to use my function against different
types of UserForms, but I'd need to be able to set the title bar.
Help!
Ion
 
I

ion

Sorry, that's backwards.


function example(smork as UserForm)
dim bulb as frmMine
smork.caption = "But, I'm on the form itself!" ' writes on the form
body
set bulb = smork
bulb.caption = "Floom" ' writes 'Floom' in Title Bar
end function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top