Hi, \r\n \r\nI have a couple of rows (which change in numbers of rows when I use another macro) and I want to put a double line at the bottom of the last row. I used the recorder to find the beginning of my code and then I modified it for my specific needs. But it says that the method Range of the object \'_Global\' failed. I need my line to be drawn from colomn A to AE. Does anyone see where is the problem in my code? \r\nThx! \r\n \r\nWerner \r\n \r\n
\r\n
Quote:
\r\n
\r\n
\r\n
\r\n \r\n \r\nSub Draw_Double_Line() \r\n \r\n\'Line that find the number of rows. \r\nLet lstRw = Sheets("Formulaire").Range("a65536").End(xlUp).Row \r\n \r\nWith Worksheets("Formulaire") \r\n Range("A:AE" & lstRw).Borders(xlDiagonalDown).LineStyle = xlNone \r\n Range("A:AE" & lstRw).Borders(xlDiagonalUp).LineStyle = xlNone \r\n Range("A:AE" & lstRw).Borders(xlEdgeLeft).LineStyle = xlNone \r\n Range("A:AE" & lstRw).Borders(xlEdgeTop).LineStyle = xlNone \r\n With Range("A:AE" & lstRw).Borders(xlEdgeBottom) \r\n .LineStyle = xlDouble \r\n .Weight = xlThick \r\n .ColorIndex = 1 \r\n End With \r\n Range("A:AE" & lstRw).Borders(xlEdgeRight).LineStyle = xlNone \r\n \r\nEnd With \r\n \r\nEnd Sub \r\n \r\n
I have a couple of rows (which change in numbers of rows when I use another macro) and I want to put a double line at the bottom of the last row. I used the recorder to find the beginning of my code and then I modified it for my specific needs. But it says that the method Range of the object '_Global' failed. I need my line to be drawn from colomn A to AE. Does anyone see where is the problem in my code?
Thx!
Werner
Quote:
Sub Draw_Double_Line()
'Line that find the number of rows.
Let lstRw = Sheets("Formulaire").Range("a65536").End(xlUp).Row
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe