Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell color change with click and record the the time and date
How would I change the color of a block of cells with one click of the mouse
and then the next click a different color? Example cells on my excel 2003 page 7,8,9/DEF make a block. I need the first click in the block to change the background green and record the Date/time somewhere else, 2nd click in the block the background will turn blue, time/date are recorded ( I will need them for later calculations) the 3rd could change it back to white, make a cycle or RED and not change from red, to signal the other time/date stamps are going to be inaccurate |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell color change with click and record the the time and date
In cell D7 insert a hyperlink to itself (don't use the hyperlink function).
Copy D7 and paste from D7 thru F9. Click on any cell in the block and you will jump to D7 In the worksheet code area insert the following event macro: Public clr As Variant Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Set r = Range("D7:F9") If Target.SubAddress = "Sheet1!D7" Then If IsEmpty(clr) Or clr = 5 Then r.Interior.ColorIndex = 50 clr = 50 Else r.Interior.ColorIndex = 5 clr = 5 End If End If End Sub Clicking in the block will toggle back and forth between green and blue -- Gary''s Student - gsnu200787 "Cyndyoxox" wrote: How would I change the color of a block of cells with one click of the mouse and then the next click a different color? Example cells on my excel 2003 page 7,8,9/DEF make a block. I need the first click in the block to change the background green and record the Date/time somewhere else, 2nd click in the block the background will turn blue, time/date are recorded ( I will need them for later calculations) the 3rd could change it back to white, make a cycle or RED and not change from red, to signal the other time/date stamps are going to be inaccurate |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
on double click change cell color | Excel Programming | |||
How can I get the system date & time for different cell record | Excel Discussion (Misc queries) | |||
Copying data from cell to other on click or color change | Excel Programming | |||
Change cell back color on click | Excel Discussion (Misc queries) | |||
how do I: click in cell and make it change color? | Excel Programming |