Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
How to change active cell border color in Excel 2007
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Jim Cone, post: 6454514"] Re: "Is it possible to do the same for selected cells rather than active cells? Just remove "(1)" in this line... With Target(1).Borders(v(i)) '--- Also, the entire code set can be simplified by replacing it with... Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) Sh.UsedRange.Borders.LineStyle = xlLineStyleNone Target.Cells.BorderAround xlContinuous, xlThick, 3 End Sub '--- The above code, however, may not be reliable in xl2010 as in the Tech Preview release of xl2010 the BorderAround method was often ignored -- Jim Cone .. .. <Dynamo> wrote in message Jim, Thank you so much for your patience. Your instructions were so easy to understand and code works fine. Took me a while to find out where the vba window was cos didnt have the developers ribbon turned on in excel options. Anyway, one last question for you now that I can see what the code actually does. Is it possible to do the same for selected cells rather than active cells? Problem with existing code is that if more than one cell is selected only the first cell has the border colour changed. Thanks once again. Paul [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
How to change active cell border color in Excel 2007
Top