#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Curser Highlight

Does anyone know how to make the cell highlight, only when it it selected,
and keep moving with the curser as you move around the spreadsheet?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Curser Highlight

You may want to try Chip Pearson's Rowliner:
http://www.cpearson.com/excel/RowLiner.htm

JayBham62 wrote:

Does anyone know how to make the cell highlight, only when it it selected,
and keep moving with the curser as you move around the spreadsheet?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Curser Highlight

Paste this into the files Thisworkbook Module - Selected cell will be
highlighted
in all your sheets - even better this macro does not affect existing
Conditional formatting..



Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub

"JayBham62" wrote:

Does anyone know how to make the cell highlight, only when it it selected,
and keep moving with the curser as you move around the spreadsheet?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Curser Highlight



"Jim May" wrote:

Paste this into the files Thisworkbook Module - Selected cell will be
highlighted
in all your sheets - even better this macro does not affect existing
Conditional formatting..



Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub

"JayBham62" wrote:

Does anyone know how to make the cell highlight, only when it it selected,
and keep moving with the curser as you move around the spreadsheet?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Curser Highlight

Thanks Jim That is cool!

"Jim May" wrote:

Paste this into the files Thisworkbook Module - Selected cell will be
highlighted
in all your sheets - even better this macro does not affect existing
Conditional formatting..



Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub

"JayBham62" wrote:

Does anyone know how to make the cell highlight, only when it it selected,
and keep moving with the curser as you move around the spreadsheet?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Curser Highlight

Thanks for the feedback; glad it worked for you...

"JayBham62" wrote:

Thanks Jim That is cool!

"Jim May" wrote:

Paste this into the files Thisworkbook Module - Selected cell will be
highlighted
in all your sheets - even better this macro does not affect existing
Conditional formatting..



Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub

"JayBham62" wrote:

Does anyone know how to make the cell highlight, only when it it selected,
and keep moving with the curser as you move around the spreadsheet?

  #7   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Curser Highlight

Nice sub there, Jim.

Is there a way for a user choice to toggle the feature on/off, when the wb
is opened?

Eg: when I'm working on the wb, I may want it to be toggled off so that undo
is not disabled (as per normal). But when I'm presenting/discussing the wb
with others, I wld like to have the cell highlight feature "on".

Thanks
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Curser Highlight

Thanks Max;
My initial response goes to perhaps setting up a Flag (boolean) type for
On/Off, True/False... you know...

"Max" wrote:

Nice sub there, Jim.

Is there a way for a user choice to toggle the feature on/off, when the wb
is opened?

Eg: when I'm working on the wb, I may want it to be toggled off so that undo
is not disabled (as per normal). But when I'm presenting/discussing the wb
with others, I wld like to have the cell highlight feature "on".

Thanks
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



  #9   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Curser Highlight

"Jim May" wrote
Thanks Max;
My initial response goes to perhaps setting up a Flag (boolean) type for
On/Off, True/False... you know


I won't know how to do that <g.
Any sample code how it could be worked into here?
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
....


  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Curser Highlight

Here's my entire code:
1) Paste these top two (2) macros into your ThisWorkbook Module.
2) Paste the next Block (one Declaration ststement & one Macro into a
Standard module)
3) Use the Forms Command Button and assign the TogglebFlag macro to it.

Hope that helps..
Jim

Private Sub Workbook_Open()
bFlag = True
ActiveCell.Interior.ColorIndex = xlColorIndexNone
ActiveCell.Borders.LineStyle = xlLineStyleNone
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Static OldCell As Range
If bFlag = True Then
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End If
End Sub

2:

Public bFlag As Boolean ' This should appear in the Declarations Section

Sub TogglebFlag()
Set OldCell = Nothing
ActiveCell.Interior.ColorIndex = xlColorIndexNone
ActiveCell.Borders.LineStyle = xlLineStyleNone
If bFlag = True Then
bFlag = False
Else: bFlag = True
End If
End Sub





"Max" wrote:

"Jim May" wrote
Thanks Max;
My initial response goes to perhaps setting up a Flag (boolean) type for
On/Off, True/False... you know


I won't know how to do that <g.
Any sample code how it could be worked into here?
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
....





  #11   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Curser Highlight

Brilliant, Jim !
Many thanks.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
highlight curser so I can see it nmaepage Excel Discussion (Misc queries) 2 October 8th 08 09:24 AM
spreadsheet Curser Shanny Excel Discussion (Misc queries) 1 May 29th 07 08:46 PM
Wild curser Jo3 Excel Discussion (Misc queries) 2 June 14th 05 05:14 PM
Wild curser Jo3 Excel Discussion (Misc queries) 1 June 9th 05 12:00 PM
Highlight cells with ctrl-click but only un-highlight one cell hagan Excel Discussion (Misc queries) 5 May 27th 05 06:45 PM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"