Macro to add border

J

JSnow

I am working on a spreadsheet, columns A through F with many rows. I would
like to add a thick black border around cells Ax:Fx on any given row.
Actually, my target cell will always be in the A column, so when I click on
the macro to execute it cells a:f in that row will be surrounded by thick
black border.

Thanks gang.
 
C

Chip Pearson

Try code like

Dim RowNum As Integer
RowNum = 10 ' Change as necesary, or use:
RowNum = ActiveCell.Row
Range(Cells(RowNum, "A"), Cells(RowNum, "F")). _
BorderAround xlSolid, xlThick, xlColorIndexAutomatic


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

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