Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Removing cell borders on any cell

I'm familiar with writing code for Word 2003, and this is my first venture
into writing VBA code for Excel (2003). How can I edit the code (which
follows) to automatically remove the bottom border from *any* row rather than
removing it from a specific range? Following is the macro I recorded. I want
to replace the range with whatever code works in Excel to Select the same
number of cells. That way I could run the macro on any row. I guess what I
need to know is what is the Excel code for shift + right + right + right, so
that it selects a certain number of cells in the row? Here's the code:

Sub cmc1()
'
' cmc1 Macro
' Macro recorded 6/24/2005 by Claudia Carvalho
'
' Keyboard Shortcut: Ctrl+f
'
Range("A2779:I2779").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Range("A2779").Select
End Sub
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
Removing Cell Borders Tim Excel Discussion (Misc queries) 2 January 19th 10 02:36 PM
Add or Delete borders of a cell by clicking on that cell Happy Proby Excel Discussion (Misc queries) 1 November 8th 09 04:37 AM
removing borders Dave Shultz Excel Discussion (Misc queries) 1 August 27th 09 02:17 PM
Why data in cell doesn't stay aligned with cell borders when prin. Danno Excel Discussion (Misc queries) 0 October 3rd 05 07:15 PM
Removing lines and/or borders mystical_ways Excel Discussion (Misc queries) 1 August 9th 05 07:35 PM


All times are GMT +1. The time now is 08:03 AM.

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

About Us

"It's about Microsoft Excel"