Thread: string width
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default string width

Three other suggestions.
One is to use a fixed width font, so you can calculate the width from the
number of characters.
Two, to make a VB6 dll that uses TextWidth. This will dermine the width of
your text.
Thirdly, to use the Windows API to get the actual width. Can't remember the
actual functions now you need, but I am sure it can be done.

RBS


"ranswrt" wrote in message
...
How do I write a code that will not allow a string to be wider than the
cell
that it is going into? The with of the cell is 27.86 (200 pixels). The
problem I have is I can't limit the number of characters because they are
different widths depending on the character.
Thanks