Userform how to: format command button text & remove close button from border

J

Jim Walsh

Subject says it all:

I am creating a userform for use with an Excel workbook. I want the form to
show when the workbook opens, and I want it to remain on the screen for the
entire time that the workbook is open. I don't want the user to be able to
close the form. I can set the ShowModal property to FALSE to make the form
modeless. But, is it possible to remove the Close button in the top right
corner of the dialog frame?

Also, the form has a command button on it. I would like to change the font
size of the caption on that button. Can't see any property that would let me
do that.

Thanks for your help.

Jim
 
S

Stephen Bullen

Hi Jim,
I am creating a userform for use with an Excel workbook. I want the form to
show when the workbook opens, and I want it to remain on the screen for the
entire time that the workbook is open. I don't want the user to be able to
close the form. I can set the ShowModal property to FALSE to make the form
modeless. But, is it possible to remove the Close button in the top right
corner of the dialog frame?

Sure, see the FormFun example on my web site. Alternatively, just trap the
QueryClose event and cancel the close if the mode is a user close.
Also, the form has a command button on it. I would like to change the font
size of the caption on that button. Can't see any property that would let me
do that.

With the button selected, click the 'Font' line in the properties window, then
the ellipis that appears.

Regards

Stephen Bullen
Microsoft MVP - Excel

Professional Excel Development
The most advanced Excel VBA book available
www.oaltd.co.uk/ProExcelDev
 

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