View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Edward Ulle Edward Ulle is offline
external usenet poster
 
Posts: 92
Default Problem setting font size

Markus

Through much trial and error. Lots of error. I finally got it to work
by including the following cText object.

Dim sShape As Shape
Dim cText As Characters ' Added

Set sShape = worksheet.AddShape(msoShapeRectangle, left,
top, width, height)
With sShape
.Fill.Transparency = 1#
.Line.Transparency = 1#
With .TextFrame
.Characters.Text = label
.HorizontalAlignment = xlHAlignCenter
.VerticalAlignment = xlVAlignCenter
End With
End With

Set cText = sShape.TextFrame.Characters ' Added
cText.Font.Size = 6 ' Added

Thanks for your suggestion.

Ed

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!