Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Temporary formatting of cell with focus
How would one go about setting up a sheet where any cell with the focus would
have, say, a red background? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Temporary formatting of cell with focus
If by focus you mean select, then try this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone Target.Interior.ColorIndex = 46 End Sub put this in worksheet code, not a standard module. -- Gary''s Student "Ricter" wrote: How would one go about setting up a sheet where any cell with the focus would have, say, a red background? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Temporary formatting of cell with focus
That works, student of Gary, thanks. One more question, is there a pallet
somewhere I can look at to find those colorindexes? 46 is orange, on my monitor anyway... Ricter "Gary''s Student" wrote: If by focus you mean select, then try this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone Target.Interior.ColorIndex = 46 End Sub put this in worksheet code, not a standard module. -- Gary''s Student "Ricter" wrote: How would one go about setting up a sheet where any cell with the focus would have, say, a red background? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Temporary formatting of cell with focus
I don't know. I usually turn on the Macro Recorder and then color a cell. I
look at the generated code to get the value. -- Gary's Student "Ricter" wrote: That works, student of Gary, thanks. One more question, is there a pallet somewhere I can look at to find those colorindexes? 46 is orange, on my monitor anyway... Ricter "Gary''s Student" wrote: If by focus you mean select, then try this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone Target.Interior.ColorIndex = 46 End Sub put this in worksheet code, not a standard module. -- Gary''s Student "Ricter" wrote: How would one go about setting up a sheet where any cell with the focus would have, say, a red background? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Temporary formatting of cell with focus
Try here
http://www.mvps.org/dmcritchie/excel...htm#colorindex -- Regards, Peo Sjoblom Excel 95 - Excel 2007 Northwest Excel Solutions www.nwexcelsolutions.com (Remove ^^ from email) "Ricter" wrote in message ... That works, student of Gary, thanks. One more question, is there a pallet somewhere I can look at to find those colorindexes? 46 is orange, on my monitor anyway... Ricter "Gary''s Student" wrote: If by focus you mean select, then try this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone Target.Interior.ColorIndex = 46 End Sub put this in worksheet code, not a standard module. -- Gary''s Student "Ricter" wrote: How would one go about setting up a sheet where any cell with the focus would have, say, a red background? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Temporary formatting of cell with focus
Ricter
Copy this to a General Module and run it. Sub ListColorIndexes() Dim Ndx As Long Sheets.Add For Ndx = 1 To 56 Cells(Ndx, 1).Interior.ColorIndex = Ndx Cells(Ndx, 2).Value = Hex(ThisWorkbook.Colors(Ndx)) Cells(Ndx, 3).Value = Ndx Next Ndx End Sub Note: if you have modified any colors, you will see discrepancies. Gord Dibben MS Excel MVP On Wed, 30 Aug 2006 12:42:02 -0700, Ricter wrote: That works, student of Gary, thanks. One more question, is there a pallet somewhere I can look at to find those colorindexes? 46 is orange, on my monitor anyway... Ricter "Gary''s Student" wrote: If by focus you mean select, then try this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone Target.Interior.ColorIndex = 46 End Sub put this in worksheet code, not a standard module. -- Gary''s Student "Ricter" wrote: How would one go about setting up a sheet where any cell with the focus would have, say, a red background? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formatting For A Cell Other Than The One With The Form | Excel Worksheet Functions | |||
Transfer Cell Formatting for linked cells | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions | |||
cell formatting problems | New Users to Excel | |||
Trying to add conditional formatting to every other cell...GOING . | Excel Worksheet Functions |