font scaling problems

D

Dewayne.Bridges

Hello,

Does anyone know what is causing this problem or how to work around
it?

I am placing comment boxes on cells that contain a table of data. I am
have tried a large variety of fixed width mono spaced fonts. This
seems to work fine at large zooming factors 70% and above, but if the
sheet is zoomed down to say 40%, it appears that my mono spaced font
is no longer used, and is replaced by, I'm assuming the default font.
This causes my table of data's columns to become misaligned. I zoom
back up and they re-align.

Does anyone know what is causing this or how to work around/prevent
it?

I have also noticed this occuring in the cells of the sheet
themselves. For example, A column that is properly sized to display
all values in the column, when zoomed smaller, now for some reason
wraps the text by a character or 2

Here is a code snippet I use to set the font, notice all of the
different fixed width fonts I have tried, none of which seem to work,
except "Terminal" font, which apparently is not a standard installed
font.

Dim myRange As Range
Set myRange = ws.Range(ws.Cells(row, col), ws.Cells(row, col))


With myRange
.ClearComments
.addComment
.Comment.visible = False
.Comment.text text:=commentStr
.Comment.Shape.TextFrame.AutoSize = True
.Comment.Shape.TextFrame.Characters.Font.Size = 12
' .Comment.Shape.TextFrame.Characters.Font.Bold = True
' .Comment.Shape.TextFrame.Characters.Font.FontStyle = "Bold
Fixedsys"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Fixedsys"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Arial monospaced
for SAP"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Fixedsys"
' .Comment.Shape.TextFrame.Characters.Font.Name = ""
' .Comment.Shape.TextFrame.Characters.Font.Name = "Vera Sans Mono"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Verdana"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Lucida Console"
.Comment.Shape.TextFrame.Characters.Font.Name = "ProFontWindows"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Terminal"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Anonymous"
' .Comment.Shape.TextFrame.Characters.Font.Name = "ElroNet
Monospace"
' .Comment.Shape.TextFrame.Characters.Font.Name = "System"
' .Comment.Shape.TextFrame.Characters.Font.Name = "Lucida Sans
Unicode"

End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top