Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Macro to add border

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Macro to add border

I moved this question to General Question -- please reply there
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Macro to add border

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)





"JSnow" wrote in message
...
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A toggling border macro Tom Excel Discussion (Misc queries) 10 May 26th 09 12:59 PM
Macro for a Border JSnow Excel Discussion (Misc queries) 2 September 3rd 08 07:51 PM
Snap an object to a cell border via macro Brettjg Excel Discussion (Misc queries) 9 May 1st 07 02:10 PM
Macro to Conditionally format Thick Border nuver[_5_] Excel Programming 5 October 7th 05 12:12 AM
Changing the border of one cell s/n change the border of adjacent gjanssenmn Excel Discussion (Misc queries) 2 October 5th 05 08:35 PM


All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"