#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Cell interior color

How do change a cell's interior color when a first gets the focus and when it
losses the focus. In other words when I first click on a cell is changes
color and when I click elsewhere it change color.

TIA
johnb
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Cell interior color

Whenever a cell is Active, it is empahsized. In XL97 it simply puts a heavy
border around the cell, in newer versions it may enphasize by some other
method. When you "click-off" that cell to another cell, the emphasis
follows. If you wish to permanently color a cell, then highlight it and do
Right-click FormatCells Patterns and choose a color..........or, you
can also color cells by using the ConditionalFormat feature...........

hth
Vaya con Dios,
Chuck, CABGx3



"johnb" wrote:

How do change a cell's interior color when a first gets the focus and when it
losses the focus. In other words when I first click on a cell is changes
color and when I click elsewhere it change color.

TIA
johnb

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Cell interior color

Hi John


One way

You can use FormatConditional Formattinguse dropdown for Formula Is
=(ROW()=CELL("Row"))
or
=(COLUMN() = CELL("Col"))
set Format to whatever you wish

In order for this to operate, it will need a sheet event to force a
Calculate, otherwise the changes won't occur

Right click on the sheet tab and choose View Code
Copy and Paste the code blow into the sheet code area. Change Sheet
number to whatever Sheet you are using, I happened to be using Sheet3

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheet3.Calculate
End Sub


--
Regards

Roger Govier


"johnb" wrote in message
...
How do change a cell's interior color when a first gets the focus and
when it
losses the focus. In other words when I first click on a cell is
changes
color and when I click elsewhere it change color.

TIA
johnb



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Cell interior color

Thanks Roger

Will try that.

"Roger Govier" wrote:

Hi John


One way

You can use FormatConditional Formattinguse dropdown for Formula Is
=(ROW()=CELL("Row"))
or
=(COLUMN() = CELL("Col"))
set Format to whatever you wish

In order for this to operate, it will need a sheet event to force a
Calculate, otherwise the changes won't occur

Right click on the sheet tab and choose View Code
Copy and Paste the code blow into the sheet code area. Change Sheet
number to whatever Sheet you are using, I happened to be using Sheet3

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Sheet3.Calculate
End Sub


--
Regards

Roger Govier


"johnb" wrote in message
...
How do change a cell's interior color when a first gets the focus and
when it
losses the focus. In other words when I first click on a cell is
changes
color and when I click elsewhere it change color.

TIA
johnb




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Cell interior color

John

You could download Chip Pearson's ROWLINER add-in from

http://www.cpearson.com/excel/RowLiner.htm

Or use event code

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 3
Set OldCell = Target
End Sub

Note: this is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that module.

If not what you're looking for, post back.


Gord Dibben MS Excel MVP

On Thu, 12 Oct 2006 03:13:02 -0700, johnb
wrote:

How do change a cell's interior color when a first gets the focus and when it
losses the focus. In other words when I first click on a cell is changes
color and when I click elsewhere it change color.

TIA
johnb


Gord Dibben MS Excel MVP
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
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM


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