Formatting a Pivot Table
Hi
Are you sure you didn't protect any cells for changes?
Leung
"NevilleT" wrote:
I posted this message before but didn't resolve it. I have a pivot table I
am trying to format. The sheet is unprotected and the code fails with an
error
"Unable to set the linestyle property of the border class"
It does however work correctly on other worksheets in the same workbook.
Dim rng As Range
Set rng = ActiveSheet.Range("A5:B600")
rng.Interior.ColorIndex = xlNone
rng.Borders(xlDiagonalDown).LineStyle = xlNone ' Error occurs here
rng.Borders(xlDiagonalUp).LineStyle = xlNone
|