Looping through columns(a:k), with rows(5-7) only

  • Thread starter Thread starter Gwen
  • Start date Start date
G

Gwen

Please assist.
I am trying to find an efficient way to accomplish the following:
for columns (a:k) rows(5:7)

With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
End With

Thank you
 
I don't understand the question yet. Are you saying you don't know how to
make the selection before executing that With group? Or is the With group
not working, and you want to know why? If the latter, you have to tell us
what error message you're getting.
 
See if this is what you want:

Sub bordlin()
With Range("A5:K7").Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
End With
End Sub
 
Thats it!
Thank you

JLGWhiz said:
See if this is what you want:

Sub bordlin()
With Range("A5:K7").Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
End With
End Sub
 

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

Back
Top