A
Alex St-Pierre
Hello,
I have a lot of error message in my programmation that does not happen when
I execute my program step by step with F8. I never encoutered this kind of
problem with excel vba. As example, in my table, I have 3 columns for each
row except for row #3 that contains only 2 columns. When I execute the macro,
it stop at this line:
Tables(1).Cell(3, 1).Borders(wdBorderTop).LineWidth = wdLineWidth025pt
giving the runtime error message 5843 (out limits). When this happens, I put
the cursor on line before and then, when click on F8 2 times, all works good.
Does anyone know why this happens ?
Thanks !
Alex
For i = 1 To 10
For j = 1 To Tables(1).Rows(i).Cells.Count
Tables(1).Cell(i, j).Borders(wdBorderTop).LineStyle =
wdLineStyleSingle
Tables(1).Cell(i, j).Borders(wdBorderTop).LineWidth =
wdLineWidth025pt
Next j
Next i
I have a lot of error message in my programmation that does not happen when
I execute my program step by step with F8. I never encoutered this kind of
problem with excel vba. As example, in my table, I have 3 columns for each
row except for row #3 that contains only 2 columns. When I execute the macro,
it stop at this line:
Tables(1).Cell(3, 1).Borders(wdBorderTop).LineWidth = wdLineWidth025pt
giving the runtime error message 5843 (out limits). When this happens, I put
the cursor on line before and then, when click on F8 2 times, all works good.
Does anyone know why this happens ?
Thanks !
Alex
For i = 1 To 10
For j = 1 To Tables(1).Rows(i).Cells.Count
Tables(1).Cell(i, j).Borders(wdBorderTop).LineStyle =
wdLineStyleSingle
Tables(1).Cell(i, j).Borders(wdBorderTop).LineWidth =
wdLineWidth025pt
Next j
Next i