How to change the UserForm Caption Font

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hi, guys and galls,

Please do the following.
Create a Userform
Change the FONT property: name or size or both

What do you expect? I thought that the caption font and size would change. But nothing happens. :confused:

Perhaps I am missing the obvious... What's the FONT property made for then?

If someone can help, that would be nice.

kind regards,
Erik

PS: some code I played with
Code:
Private Sub UserForm_Click()

Me.Font.Size = 10
Me.Font.Name = "Trebuchet MS"
MsgBox Me.Font.Name & vbNewLine & Me.Font.Size
 
Me.Font.Size = 40
Me.Font.Name = "Arial"
MsgBox Me.Font.Name & vbNewLine & Me.Font.Size

End Sub
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Wow! I will take a look at it before the end of the week ;)
Does your method require to use old fashioned "X" button or you can keep system formatting ?
 
Upvote 0
Wow! I will take a look at it before the end of the week ;)
Does your method require to use old fashioned "X" button or you can keep system formatting ?

Unfortunately, The DrawFrameConttrol API produces only classic-looking "X" buttons. The only thing I can think of is to dynamically get the screen region that the close button is located in and exclude that region from the clipping region.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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