Nothing seems to work, I set the properties below and get error
Code:
Private Sub DrawBoxSubOrdinate(MyDocument, FullName, DataInBox, Left, Top, ShapeWidth, ShapeHeight, FontSize, TheColor)
'draws a box and puts text in it at the location
With MyDocument.Shapes.AddShape(msoShapeRectangle, _
Left, Top, ShapeWidth, ShapeHeight)
.Fill.Visible = msoFalse
.Name = FullName
.Line.Visible = msoFalse
.TextFrame2.TextRange.Text = DataInBox
[highlight #FCE94F] '.TextFrame2.HorizontalAlignment = xlHAlignCenter[/highlight]
'.TextFrame2.VerticalAlignment = xlVAlignCenter
'.TextFrame2. ????
With .TextFrame2.TextRange.Font
.Name = "Arial"
.Size = FontSize
'.Bold = msoFalse
Select Case TheColor
Case "Blue"
.Fill.ForeColor.RGB = RGB(0, 0, 255)
Case "Black"
.Fill.ForeColor.RGB = RGB(0, 0, 0)
Case "Green"
.Fill.ForeColor.RGB = RGB(0, 255, 0)
Case Else
.Fill.ForeColor.RGB = RGB(0, 0, 0) ' black in case the color is empty
End Select
[highlight #FCE94F]'.HorizontalAnchor = msoAnchorNone[/highlight]
End With
End With
End Sub
DougP