Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
highlight with right click?
is there a simple way to color a cell with a right click (excel2003) ?
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
highlight with right click?
Hi Newbie,
Perhaps a the response to a double click would meet your needs? Try: '============= Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) Target.Interior.ColorIndex = 6 '<<== CHANGE End Sub '<<============= This is worksheet event code and should be pasted into the worksheets's code module (not a standard module and not the workbook's ThisWorkbook module): Right-click the worksheet's tab Select 'View Code' from the menu and paste the code. Alt-F11 to return to Excel. --- Regards, Norman "Newbie" wrote in message ... is there a simple way to color a cell with a right click (excel2003) ? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
highlight with right click?
works like a dream. Thank you Norman.
"Norman Jones" wrote: Hi Newbie, Perhaps a the response to a double click would meet your needs? Try: '============= Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) Target.Interior.ColorIndex = 6 '<<== CHANGE End Sub '<<============= This is worksheet event code and should be pasted into the worksheets's code module (not a standard module and not the workbook's ThisWorkbook module): Right-click the worksheet's tab Select 'View Code' from the menu and paste the code. Alt-F11 to return to Excel. --- Regards, Norman "Newbie" wrote in message ... is there a simple way to color a cell with a right click (excel2003) ? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
highlight with right click?
Norman:
Seeing this reminds me (daaa) - seems like a double-click caused excel to think you wished to Edit a cell and thereby a Cancel = True line needed to be entered -- before proceeding with the code. Can you clarify my confusion? Thanks always for you great contribution to these NG's.. Jim May "Norman Jones" wrote: Hi Newbie, Perhaps a the response to a double click would meet your needs? Try: '============= Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) Target.Interior.ColorIndex = 6 '<<== CHANGE End Sub '<<============= This is worksheet event code and should be pasted into the worksheets's code module (not a standard module and not the workbook's ThisWorkbook module): Right-click the worksheet's tab Select 'View Code' from the menu and paste the code. Alt-F11 to return to Excel. --- Regards, Norman "Newbie" wrote in message ... is there a simple way to color a cell with a right click (excel2003) ? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
highlight with right click?
Hi Jim,
You are quite correct! Amending, therefore the code: '============= Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) Cancel = True Target.Interior.ColorIndex = 6 End Sub '<<============= Thanks for the remonder! -- Regards, Norman "Jim May" wrote in message ... Norman: Seeing this reminds me (daaa) - seems like a double-click caused excel to think you wished to Edit a cell and thereby a Cancel = True line needed to be entered -- before proceeding with the code. Can you clarify my confusion? Thanks always for you great contribution to these NG's.. Jim May "Norman Jones" wrote: Hi Newbie, Perhaps a the response to a double click would meet your needs? Try: '============= Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) Target.Interior.ColorIndex = 6 '<<== CHANGE End Sub '<<============= This is worksheet event code and should be pasted into the worksheets's code module (not a standard module and not the workbook's ThisWorkbook module): Right-click the worksheet's tab Select 'View Code' from the menu and paste the code. Alt-F11 to return to Excel. --- Regards, Norman "Newbie" wrote in message ... is there a simple way to color a cell with a right click (excel2003) ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to highlight more related cells if cell highlight | Excel Discussion (Misc queries) | |||
click on one cell to find and highlight a related cell? | Excel Discussion (Misc queries) | |||
Disabling click and right-click on the Picture I inserted in an Excel document | Excel Worksheet Functions | |||
Click on graph bar to execute a double-click in a pivot table cell | Charts and Charting in Excel | |||
Highlight cells with ctrl-click but only un-highlight one cell | Excel Discussion (Misc queries) |