ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Font size (Excel-Autocad) (https://www.excelbanter.com/excel-programming/339864-font-size-excel-autocad.html)

stefano

Font size (Excel-Autocad)
 
Hi,
I'm writing some code that draws a Range on Autocad using the mtext
object.
Basically, for each cell in my range I draw a rectangle in Acad of
cell.Height x cell.Width
with mtext.Height = cell.Font.Size

I have some problems whit the font height (any type of font).
If "Stefano" fits in my range in acad goes outside the rectangle...
Now my code is mtext.Height = cell.Font.Size - 3 (and it works fine)
but
is there a perfect way to adjust the size?

Regards,
Stefano



All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com