Error with Borders of a Range

R

RyanH

I am trying to draw borders around the columns in the ranges below. For some
reason I am getting an Error indicated below: "Unable to set the weight
property of the Border Class". This makes no sense to me because the code
before it works fine but it keeps getting hung up on the line indicated
below. Any ideas?

' adds border to quote sheet and product information
With .Range("B" & ActiveCell.Row, "H" & ActiveCell.Row + 28)
.Borders(xlEdgeTop).Weight = xlThin
.Borders(xlEdgeBottom).Weight = xlThin
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
End With

With .Range("C" & ActiveCell.Row, "G" & ActiveCell.Row + 28)
.Borders(xlEdgeLeft).Weight = xlThin
ERROR>> .Borders(xlEdgeRight).Weight = xlThin
End With

With .Range("F" & ActiveCell.Row, "F" & ActiveCell.Row + 28)
.Borders(xlEdgeLeft).Weight = xlThin
.Borders(xlEdgeRight).Weight = xlThin
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top