I should have mentioned that after deleting line 30 and 31 it failed only
when i=126 (was 128 before deletion). I have also found that if I right
click on a failing line and select "Format Cells" I get no format menu (or
any other response). Hmm - Now it doesn't seem as if it is a VBA problem.
Also, the For statement was : For i = 2 To 1000 Step 2
On Thu, 03 Jun 2010 12:37:53 -0400,
wrote:
In Excel 2003 I have the following code:
For i = 2 1000 Step 2
Range(i + 1 & ":" & i + 1).Borders(xlEdgeBottom).LineStyle =
xlDouble
Next i
This code fails with the error "Unable to set the LineStyle property of the
border class" for i = 30 and i=128. It works for all the other lines.
Can anyone help me figure out what is going on?
Thanks