View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default worksheet set to highlite a cell while data is being entered

Try
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static mytarget As Range
If Not mytarget Is Nothing Then mytarget.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 8
Set mytarget = Target
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"speerchucker30x378" wrote:



"Jacob Skaria" wrote:

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static mytarget As Range
If Not mytarget Is Nothing Then _
mytarget.Interior.ColorIndex = xlNone
Target.Interior.ColorIndex = 8
Set mytarget = Target
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"speerchucker30x378" wrote:

Can excel be set so that the active cell is highlighted while data is entered?


Hi Jacob
It seams to work but I get an error and the debugger hangs up on line 5 and
it will not proceed to the next cell.