Specify font for MsgBox display?

  • Thread starter Thread starter shockley
  • Start date Start date
S

shockley

I want a msgBox to have a non-proportional font so that I can set up evenly
spaced columns of text. Excel 97/vb Help says I can do this but it doesn't
say how??

Related question: Is it possible to get the length (in inches, for example)
of a string of characters? Seems like you should be able to add up the
lengths of each character in a string to get the length of the string but I
can't find the right properties to do this.
 
1. The font is controlled in your windows display settings for message
box.<

John, thanks, I would have thought there would be a way to set the msgBox
font from vb but I guess not...
2. len(string) gives you the length in characters including spaces and
punctuation. Converting that to inches can be done if you know the font size
and the screen resolution.<

This only works for non-proportional fonts, right? I guess I could deduce
the actual or the relative length of each character in a proportional font
by--for example--seeing how many characters fit into a tab zone, then
create a lookup table and thus, have the info I need.

Larry



1. The font is controlled in your windows display settings for message box.

2. len(string) gives you the length in characters including spaces and
punctuation.
Converting that to inches can be done if you know the font size and the
screen resolution.<
 
Back
Top