Thread
:
Help required putting borders around cells.
View Single Post
#
10
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Help required putting borders around cells.
Glad to help.
May I be a cheeky so and so and ask, how do I get the
macro to set PrintArea to the new range each time
the macro is run.
try
.range("A3:F" & lastrow).address
--
Don Guillett
SalesAid Software
"Centurian" wrote in message
.. .
Don Guillett wrote:
try this - UN tested
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B3").AutoFill Destination:=.Range("B3:B" & LastRow) _
, Type:=xlFillDefault
.range("b3:f" & lastrow).Borders.LineStyle = xlContinuous
end with
End Sub
Thanks Don,
This worked beautifully after adjusting the range.
.Range("A3").AutoFill Destination:=.Range("A3:F" & LastRow) _
, Type:=xlFillDefault
.range("A3:F" & lastrow).Borders.LineStyle = xlContinuous
May I be a cheeky so and so and ask, how do I get the
macro to set PrintArea to the new range each time
the macro is run.
.range("A3:F" & lastrow) ??????????
I've looked in the object browser but cant see anything
obvious to use.
Regards
Centurian
aka... Kevin ( Lancashire, England, Europe )
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]