N
NevilleT
I am trying to format a pivot table after it is refreshed. I have the
following code which causes an error on the first Selection.Borders line
where I clear the grid.
Range("A5:AO600").Select ' Set borders
Selection.Interior.ColorIndex = xlNone ' Remove fill
Selection.Borders(xlDiagonalDown).LineStyle = xlNone ' Clear the grid
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
The error is Runtime Error 1004. Unable to set the LineStyle property of
the Border class.
I am running Access 2007 but tried it on Access 2003 with the same result.
While I have been working on the file, I am sure I have not touched this
code, and it did work in the past. Any suggestions?
following code which causes an error on the first Selection.Borders line
where I clear the grid.
Range("A5:AO600").Select ' Set borders
Selection.Interior.ColorIndex = xlNone ' Remove fill
Selection.Borders(xlDiagonalDown).LineStyle = xlNone ' Clear the grid
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
The error is Runtime Error 1004. Unable to set the LineStyle property of
the Border class.
I am running Access 2007 but tried it on Access 2003 with the same result.
While I have been working on the file, I am sure I have not touched this
code, and it did work in the past. Any suggestions?