sharath
09-16-2005, 10:14 AM
Hi All,
I'm unable to figureout what type I need to declare for cellFrame,Here I'm giving the code
Set cellFrame = shpGrpTable.Table.Cell(1, 1).Shape.TextFrame
Call FormatMyCell(cellFrame, "GROUP", 14, "Arial", msoTrue, 16777215, msoAnchorCenter, 3, True, 13382451)
--
Sub FormatMyCell(MyCell As Shape, Text As String, FontSize As Single, _
FontName As String, FontBold As Boolean, FontColor As MsoRGBType, HoriAnchor As MsoHorizontalAnchor, VertAnchor As MsoVerticalAnchor, FillProp As Boolean, FillColor As MsoRGBType)
With MyCell
If Text <> "" Then
.Text = Text
With .Font
.Size = FontSize
.Name = FontName
.Color.RGB = FontColor
.Bold = FontBold
End With
End If
.HorizontalAnchor = MsoHorizontalAnchor
.VerticalAnchor = MsoVerticalAnchor
If FillProp = True Then
.Solid
.ForeColor.RGB = FillColor
End If
End With
End Sub
---
Thanks,
Sharath.
I'm unable to figureout what type I need to declare for cellFrame,Here I'm giving the code
Set cellFrame = shpGrpTable.Table.Cell(1, 1).Shape.TextFrame
Call FormatMyCell(cellFrame, "GROUP", 14, "Arial", msoTrue, 16777215, msoAnchorCenter, 3, True, 13382451)
--
Sub FormatMyCell(MyCell As Shape, Text As String, FontSize As Single, _
FontName As String, FontBold As Boolean, FontColor As MsoRGBType, HoriAnchor As MsoHorizontalAnchor, VertAnchor As MsoVerticalAnchor, FillProp As Boolean, FillColor As MsoRGBType)
With MyCell
If Text <> "" Then
.Text = Text
With .Font
.Size = FontSize
.Name = FontName
.Color.RGB = FontColor
.Bold = FontBold
End With
End If
.HorizontalAnchor = MsoHorizontalAnchor
.VerticalAnchor = MsoVerticalAnchor
If FillProp = True Then
.Solid
.ForeColor.RGB = FillColor
End If
End With
End Sub
---
Thanks,
Sharath.