Hello,

I am creating a table in VBA and have a number of formatting requirements. I am having trouble with 2 formatting specifics:

1. Adding a bottom border to the top row only
2. Adjusting the height and width of the cells within the table. I want the top row to have a height of 0.2", the remaining 16 rows to have a height of 0.25", the first column to have a width of 1.51" and the second column to have a width of 0.75"

I have only included the relevant portions of the code that I am having trouble with. Currently when I run the code, there is no border created, and the cell height / width is not set.

Thanks in advance for your help I really appreciate it!

' Create table
Dim tbl As Shape
Dim lRow As Long
Dim lColumn As Long


Set tbl = Sld.Shapes.AddTable(17, 2)
With tbl.Table


' Initially formats the table as no style, no grid so that it can be adjusted
.ApplyStyle "{2D5ABB26-0587-4C30-8999-92F81FD0307C},True"

'Text & border for the top row
With .Cell(1, 1)
.Shape.TextFrame.TextRange.Text = "Header 1"
.Shape.TextFrame.TextRange.Font.Color.RGB = RGB(90, 90, 90)
.Shape.TextFrame.TextRange.Font.Name = "Arial"
.Shape.TextFrame.TextRange.Font.Size = 10
.Borders(ppBorderBottom).ForeColor.RGB = RGB(90, 90, 90)
End With

With .Cell(1, 2)
.Shape.TextFrame.TextRange.Text = "Header 2"
.Shape.TextFrame.TextRange.Font.Color.RGB = RGB(90, 90, 90)
.Shape.TextFrame.TextRange.Font.Name = "Arial"
.Shape.TextFrame.TextRange.Font.Size = 10
.Borders(ppBorderBottom).ForeColor.RGB = RGB(90, 90, 90)
End With

' Height of Rows and Width of Columns
With .Columns(1)
.Width = 108.72
.Height = 18
End With


With .Columns(2)
.Width = 54
.Height = 18
End With


With .Rows(1)
.Height = 14.4
End With