Pg 64 example does not work!

Hi,

Cannot get the below code to work. It breaks on hte borderaround method

thx
Howard

Public Sub GetExcel_Add_Wkssht_Format()

Dim xlApp As Excel.Application
Dim xlWb As Excel.Workbook
Dim xlWs As Excel.Worksheet
Dim xlrng As Excel.Range

Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlWb = xlApp.Workbooks.Add
Set xlWs = xlApp.Worksheets.Add
xlWs.Name = "Mynewwksht"
Set xlrng = xlWs.Range("B4")

With xlrng
.Value = "Employee Data"
.Font.Bold = True
.BorderAround xlContinuous, xlThick, 5
End With

xlWs.Columns("B").AutoFit
End Sub
1 person has
this problem
+1
Reply