Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Active Cell Border Color

I know this can be done, I just can remember how or seem to be able to find
it under help.

I would like the border around my active cell to be a different color so it
stands out easier than the now black border on an all black text document. I
know how to add borders to cells, but I need the active cell border than
moves to change color. Please help if you know how to do this!

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Active Cell Border Color

Put the following Event macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim v As Variant
v = Array(xlEdgeBottom, xlEdgeTop, xlEdgeRight, xlEdgeLeft)
For Each r In ActiveSheet.UsedRange
With r
For i = 0 To 3
.Borders(v(i)).LineStyle = xlNone
Next
End With
Next

For i = 0 To 3
With ActiveCell.Borders(v(i))
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 7
End With
Next
End Sub


REMEMBER: the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200773


"Linda Oshkosh WI" wrote:

I know this can be done, I just can remember how or seem to be able to find
it under help.

I would like the border around my active cell to be a different color so it
stands out easier than the now black border on an all black text document. I
know how to add borders to cells, but I need the active cell border than
moves to change color. Please help if you know how to do this!

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Active Cell Border Color

Your event macro works well with single cells..thank you!

How might one get all boarders of merged cells to change color?



GarysStuden wrote:

Active Cell Border Color
13-Mar-08

Put the following Event macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim v As Variant
v = Array(xlEdgeBottom, xlEdgeTop, xlEdgeRight, xlEdgeLeft)
For Each r In ActiveSheet.UsedRange
With r
For i = 0 To 3
.Borders(v(i)).LineStyle = xlNone
Next
End With
Next

For i = 0 To 3
With ActiveCell.Borders(v(i))
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 7
End With
Next
End Sub


REMEMBER: the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200773


"Linda Oshkosh WI" wrote:

Previous Posts In This Thread:

On Thursday, March 13, 2008 9:07 AM
Linda Oshkosh W wrote:

Active Cell Border Color
I know this can be done, I just can remember how or seem to be able to find
it under help.

I would like the border around my active cell to be a different color so it
stands out easier than the now black border on an all black text document. I
know how to add borders to cells, but I need the active cell border than
moves to change color. Please help if you know how to do this!

Thanks.

On Thursday, March 13, 2008 11:07 AM
GarysStuden wrote:

Active Cell Border Color
Put the following Event macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim v As Variant
v = Array(xlEdgeBottom, xlEdgeTop, xlEdgeRight, xlEdgeLeft)
For Each r In ActiveSheet.UsedRange
With r
For i = 0 To 3
.Borders(v(i)).LineStyle = xlNone
Next
End With
Next

For i = 0 To 3
With ActiveCell.Borders(v(i))
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = 7
End With
Next
End Sub


REMEMBER: the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200773


"Linda Oshkosh WI" wrote:


Submitted via EggHeadCafe - Software Developer Portal of Choice
MSChart For VB.Net
http://www.eggheadcafe.com/tutorials...for-vbnet.aspx
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
How do I make the border of an active cell in Excel darker? luv2sing Excel Discussion (Misc queries) 1 July 22nd 06 04:36 PM
On a Mac how do I change the border colour of the active cell? Lino Excel Discussion (Misc queries) 2 May 23rd 06 01:36 PM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM
Default Border, Font Color, and Cell Background Color Elijah Excel Discussion (Misc queries) 1 October 28th 05 04:10 PM
How do you change the color of the cell hi-lite border Animator Excel Worksheet Functions 0 October 29th 04 07:40 PM


All times are GMT +1. The time now is 07:56 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"