Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Peter
 
Posts: n/a
Default Highlight Active Cell...With a Diffrence

Hello All,
I am trying to get a form of active cell highlight, but with a slight
diffrence.

I need the cell to remain coloured after it's not the active cell anymore.

So in a nutshell, any cell that is clicked on, will stay the colour when
it's no longer active.

Thanks
Peter
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
End With
.FormatConditions(1).Interior.ColorIndex = 20
End With

End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Peter" wrote in message
...
Hello All,
I am trying to get a form of active cell highlight, but with a slight
diffrence.

I need the cell to remain coloured after it's not the active cell anymore.

So in a nutshell, any cell that is clicked on, will stay the colour when
it's no longer active.

Thanks
Peter



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
Active cell blinks for no reason while running inside of Citrix XP Ed Miller Excel Worksheet Functions 1 January 25th 05 04:53 PM
Unable to set the active cell from VBA HMS New Users to Excel 1 December 7th 04 09:56 PM
Highlight Active Cell Db1712 Excel Discussion (Misc queries) 1 November 26th 04 01:14 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
Load active cell data via a function Mike G - D.C. Excel Worksheet Functions 2 November 23rd 04 09:13 PM


All times are GMT +1. The time now is 03:13 PM.

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"