ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   worksheet set to highlite a cell while data is being entered (https://www.excelbanter.com/excel-discussion-misc-queries/246523-worksheet-set-highlite-cell-while-data-being-entered.html)

speerchucker30x378

worksheet set to highlite a cell while data is being entered
 
Can excel be set so that the active cell is highlighted while data is entered?

Rick Rothstein

worksheet set to highlite a cell while data is being entered
 
When I select a cell, it is automatically highlighted with a heavy border
around it, so I'm guessing you have something else in mind... if you
describe what it is, maybe we can help you out. Just so you know, whatever
you describe for us will probably require VB code, so be prepared for that.

--
Rick (MVP - Excel)


"speerchucker30x378" wrote in
message ...
Can excel be set so that the active cell is highlighted while data is
entered?



Jacob Skaria

worksheet set to highlite a cell while data is being entered
 
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?


speerchucker30x378

worksheet set to highlite a cell while data is being entered
 


"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?


speerchucker30x378

worksheet set to highlite a cell while data is being entered
 


"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?


speerchucker30x378

worksheet set to highlite a cell while data is being entered
 


"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.

Jacob Skaria

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.


Rick Rothstein

worksheet set to highlite a cell while data is being entered
 
If you are willing to tolerate cell color highlighting (it means you can't
have manually colored cells on the worksheet and probably would interfere
with conditional formatting as well), then why not really highlight the
cell...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0
Union(Target.EntireColumn, Target.EntireRow).Interior.ColorIndex = 8
Target.Interior.ColorIndex = 0
End Sub

--
Rick (MVP - Excel)


"speerchucker30x378" wrote in
message ...


"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.



speerchucker30x378

worksheet set to highlite a cell while data is being entered
 


"Rick Rothstein" wrote:

When I select a cell, it is automatically highlighted with a heavy border
around it, so I'm guessing you have something else in mind... if you
describe what it is, maybe we can help you out. Just so you know, whatever
you describe for us will probably require VB code, so be prepared for that.

--
Rick (MVP - Excel)


"speerchucker30x378" wrote in
message ...
Can excel be set so that the active cell is highlighted while data is
entered?


.
I have a simple invoice system that pretty much had to be custom made for an odd industry. Many of the cells are already surrounded by a border so when I select those cells to enter data into them the highlighted border virtually disappears. If I leave for a moment or two I have to re-select the cell as I can not see which one I have left open.


speerchucker30x378

worksheet set to highlite a cell while data is being entered
 


"speerchucker30x378" wrote:



"Rick Rothstein" wrote:

When I select a cell, it is automatically highlighted with a heavy border
around it, so I'm guessing you have something else in mind... if you
describe what it is, maybe we can help you out. Just so you know, whatever
you describe for us will probably require VB code, so be prepared for that.

--
Rick (MVP - Excel)


"speerchucker30x378" wrote in
message ...
Can excel be set so that the active cell is highlighted while data is
entered?


.
I have a simple invoice system that pretty much had to be custom made for an odd industry. Many of the cells are already surrounded by a border so when I select those cells to enter data into them the highlighted border virtually disappears. If I leave for a moment or two I have to re-select the cell as I can not see which one I have left open.





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 (THIS SEEMS TO BE WHERE IT HANGS UP) Jacob
Set mytarget = Target
End Sub

Jacob Skaria

worksheet set to highlite a cell while data is being entered
 
'Unable to recreate..Try the below version...

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

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


"speerchucker30x378" wrote:



"speerchucker30x378" wrote:



"Rick Rothstein" wrote:

When I select a cell, it is automatically highlighted with a heavy border
around it, so I'm guessing you have something else in mind... if you
describe what it is, maybe we can help you out. Just so you know, whatever
you describe for us will probably require VB code, so be prepared for that.

--
Rick (MVP - Excel)


"speerchucker30x378" wrote in
message ...
Can excel be set so that the active cell is highlighted while data is
entered?

.
I have a simple invoice system that pretty much had to be custom made for an odd industry. Many of the cells are already surrounded by a border so when I select those cells to enter data into them the highlighted border virtually disappears. If I leave for a moment or two I have to re-select the cell as I can not see which one I have left open.





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 (THIS SEEMS TO BE WHERE IT HANGS UP) Jacob
Set mytarget = Target
End Sub


Rick Rothstein

worksheet set to highlite a cell while data is being entered
 
Jacob's code works for me. Did you try the code I posted against your
response to Jacob elsewhere in this thread?

--
Rick (MVP - Excel)


"speerchucker30x378" wrote in
message ...


"Rick Rothstein" wrote:

When I select a cell, it is automatically highlighted with a heavy border
around it, so I'm guessing you have something else in mind... if you
describe what it is, maybe we can help you out. Just so you know,
whatever
you describe for us will probably require VB code, so be prepared for
that.

--
Rick (MVP - Excel)


"speerchucker30x378" wrote
in
message ...
Can excel be set so that the active cell is highlighted while data is
entered?


.
I have a simple invoice system that pretty much had to be custom made for
an odd industry. Many of the cells are already surrounded by a border so
when I select those cells to enter data into them the highlighted border
virtually disappears. If I leave for a moment or two I have to re-select
the cell as I can not see which one I have left open.




All times are GMT +1. The time now is 02:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com