MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Painting cells while entering data- is it possible?

Posted by Eli Weiss on July 05, 2001 1:42 AM

Is there any simple way to paint a cell while entering data into it??? I mean in one step.
Thank you in advance

Posted by Ivan F Moala on July 05, 2001 1:48 AM

Not too sure of your exact requirements
but have a look @ Data Validation in oline help.


Posted by Eli Weiss on July 05, 2001 1:57 AM

Thank you Ivan,

I mean that when I am overwriting old data in a cell, I want the cell to change its color in order to be sure that my input is a new one


Posted by Eli Weiss on July 05, 2001 2:32 AM

Online help? - do not help!

Posted by Joe Was on July 05, 2001 1:36 PM

VB Sheet Tab, View code Macro

This code toggles a cell color on and off with each click it is a Sheet-Tab, View code, macro!

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

Posted by Joe Was on July 05, 2001 1:42 PM

VB Hot-key Code

To work this, copy the code below and paste to your Macros. Then select each macro and assign a Hot-key to each with Macro-Options, I used Ctrl-s for the 1st for Select and Ctrl-u for the 2nd for Un-Select. The first Code will ( Yellow ) your selected cell when you press Ctrl-s and the second will return the cell color to ( Normal ) when you press Ctrl-u.

Sub Macro1()
' Macro1 Macro
' Macro by Joseph S. Was
' Ctrl-s
Application.CutCopyMode = False
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End Sub

Sub Macro2()
' Macro2 Macro
' Macro by Joseph S. Was
' Ctrl-u
Selection.Interior.ColorIndex = xlNone
End Sub

Hope this helps. JSW