Hi all
I have a question.
I need to change the font size & type. How?
For msgbox and msgbox function.
Eg:
1. Msgbox "Welcome"
2. Response = Msgbox ("Want to eat lunch?", vbQuestion + vbYesNo, "Question")
How?
Rdgs
Hi all
I have a question.
I need to change the font size & type. How?
For msgbox and msgbox function.
Eg:
1. Msgbox "Welcome"
2. Response = Msgbox ("Want to eat lunch?", vbQuestion + vbYesNo, "Question")
How?
Rdgs
The easiest way to see hoe to alter your font size, etc is to carry out the operation whilst recording a macro.
'turn Font red
Selection.Font.ColorIndex = 3
@ change font to 12 and Arial Black
With Selection.Font
.Name = "Arial Black"
.Size = 12
End with
does that apply to how I alter the font size for the msgbox?
I'm not sure you can do much with the font properties within a messagebox.
I think that if you want something fancier than the windows default, you'll need to build userforms that act like message boxes (& which you have far greater control over formatting)....
It's a bit like the auto-form in excel.... you can't change much of it, so if it's no good, you need to build your own...
Hope this helps,
Will
Hi
As Roy and Will have said I too have never solved font size in Message Box’s, but often I do amend things such as font and size in UserForms, you will find this is the way forward but I will never say UserForms can be the easiest development and take a few attempts to get going.
You will need to edit and amend the Properties – UISerform window, and look under Alphabetic there you will see font settings, remember these can be over ridden with VBA Code Lines also.
If you get such on Userforms start a new feed for the UserForm questions I and I know many of OzGrid members do use UserForms extensively. Good luck
Kindest possible regards
Jack in the UK
Some code that will on activation of a UserForm will make the font size 16
Hope this get you started
Jack
Code:
Private Const FS = 16
Private Sub UserForm_Activate()
UserForm1.TextBox1.Text = "Jack in the UK"
UserForm1.TextBox1.FontSize = FS
End Sub
Don’t have an account yet? Register yourself now and be a part of our community!