Is it possible to increase font size in MsgBox?


Posted by Derek on January 06, 2002 6:12 PM

Does anyone know the code for increasing the size of the font that is displayed in MsgBox? Thanks
Derek

Posted by Ivan F Moala on January 06, 2002 7:48 PM

Derek, the Font type and size is controlled via
the Windows Display Properties appearance. ie.
changing it here changes it globally for all
windows applications.
eg Right click DeskTop > Properties > appearance
then select Msgbox in the Item drop list.
(Or click on the msg text in the image)

To change programactically.......I think I have
something some where.....involves send keys

Post If you want ???

Ivan

Posted by Derek on January 06, 2002 9:06 PM

Thanks Ivan. I was really looking for a way to write it into a macro that would apply only to the active worksheet. Is that possible?
thanks again
Derek

Posted by Ivan F Moala on January 07, 2002 1:23 AM

I don't know of a way to change the font size of
the msgbox for the application only BUT.
1) You could use a Userform and change it that way
2) Change the system font then change it back after.....but this can be messy with diff OS.

here is some code Win98 to change the system
font for msgboxs - changes it one size up!

Sub ChangeMsg_FontSize()

Call Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,2")
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 3
waitTime = TimeSerial(newHour, newMinute, newSecond)
'Give time to get it up
Application.Wait waitTime

'select msgbox
Application.SendKeys "{TAB}{TAB}{TAB}{down}{down}{down}{down}{down}{down}{down}", True
'select font = same font-next size up
Application.SendKeys "{TAB}{TAB}{down}"
'select Apply button
Application.SendKeys "{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{enter}", True
'now enter to dismiss
Application.SendKeys "{enter}"

MsgBox "Testing Size of Font"
End Sub


Ivan



Posted by Derek on January 07, 2002 1:35 AM

Re: Thanks very much Ivan (NT)