G
Guest
The following is a code snippet. The "With .Selection.Font" portion works
fine. I get an error on the "With Selection.Borders(xlEdgeLeft)" portion.
The Excel macro from which I imported the code works fine. What, if
anything, am I doing wrong?
Thanks in Advance
Set xlApp = CreateObject("excel.Application")
Set xlBook = xlApp.Application.Workbooks.Open(strFileLoc & ".xls")
With xlApp
With .Selection.Font
.Name = "Arial Narrow"
.Size = 8
End With
With .Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
End With
fine. I get an error on the "With Selection.Borders(xlEdgeLeft)" portion.
The Excel macro from which I imported the code works fine. What, if
anything, am I doing wrong?
Thanks in Advance
Set xlApp = CreateObject("excel.Application")
Set xlBook = xlApp.Application.Workbooks.Open(strFileLoc & ".xls")
With xlApp
With .Selection.Font
.Name = "Arial Narrow"
.Size = 8
End With
With .Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
End With