Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default which line mercy script

Going Blind... is there a code for hiliting a row when any cell in that line
is selected. Thanks.............
  #2   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default which line mercy script

P.S.: If can, example with both of:
- grey hilite same as when select row on left,
- & a double wide border.

"nastech" wrote:

Going Blind... is there a code for hiliting a row when any cell in that line
is selected. Thanks.............

  #3   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default which line mercy script

You could try this in the worksheet's SelectionChange event:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

' clear any previous highlighting
Columns(1).EntireRow.Interior.ColorIndex = xlNone

' set shading for selection
Target.Rows.EntireRow.Interior.Color = vbYellow
End Sub


(As long as you don't use cell shading for any other purpose...)



nastech wrote:
Going Blind... is there a code for hiliting a row when any cell in that line
is selected. Thanks.............


  #4   Report Post  
Posted to microsoft.public.excel.misc
Art
 
Posts: n/a
Default which line mercy script

nastech,

I don't know if there's a formula. However, you could put the following
macro in the Sheet you're working with:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static mRow As Long
If mRow < 0 Then
Rows(mRow).Interior.ColorIndex = xlNone
End If
mRow = Target.Row
Rows(mRow).Interior.ColorIndex = 56
End Sub

You would get there by hitting the visual basic editor and looking for the
sheet name. Double click on it to get a blank screen and paste the macro in
there. It should work.

"nastech" wrote:

Going Blind... is there a code for hiliting a row when any cell in that line
is selected. Thanks.............

  #5   Report Post  
Posted to microsoft.public.excel.misc
Kris
 
Posts: n/a
Default which line mercy script

Art wrote:
nastech,

I don't know if there's a formula. However, you could put the following
macro in the Sheet you're working with:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static mRow As Long
If mRow < 0 Then
Rows(mRow).Interior.ColorIndex = xlNone
End If
mRow = Target.Row
Rows(mRow).Interior.ColorIndex = 56
End Sub


What if cells have interior.colorIndex set?

I propose to use xor to change colorindex value.

Rows(mRow).Interior.ColorIndex = Rows(mRow).Interior.ColorIndex xor 8


  #6   Report Post  
Posted to microsoft.public.excel.misc
Art
 
Posts: n/a
Default which line mercy script

Kris,

Seems like a better idea. Of course depending on the intial color, you
could wind up with something unpleasant.

Art

"Kris" wrote:

Art wrote:
nastech,

I don't know if there's a formula. However, you could put the following
macro in the Sheet you're working with:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static mRow As Long
If mRow < 0 Then
Rows(mRow).Interior.ColorIndex = xlNone
End If
mRow = Target.Row
Rows(mRow).Interior.ColorIndex = 56
End Sub


What if cells have interior.colorIndex set?

I propose to use xor to change colorindex value.

Rows(mRow).Interior.ColorIndex = Rows(mRow).Interior.ColorIndex xor 8

  #7   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default which line mercy script

Hi, don't know if you're still there, did not have time to look at before,
For a macro to hilite line where cursor currently resides, was wondering if
there was a way to use top & bottom (medium / heavy) borders to hilite line.
Otherwise if there is a color for yellow / some other hilite than black.

saw an example with yellow line (but rest of script wiped color from sheet):
Target.Rows.EntireRow.Interior.Color = vbYellow

Else first preference might be to have line slighlty greyed / shadowed as it
is when you select line on left (colors- borders should not be destroyed,
colors remain intact while working on line desireable.. ) thanks

Problem ran into is trying to combine with script using for date, can it be
combined with: (thanks)

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Target.Row < 91 Then Exit Sub
If Me.Cells(.Row, "A").Value = "." Then Exit Sub
If Not Intersect(Me.Range("AV:AW"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Me.Cells(.Row, "BC")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
End With
End Sub


XXXXXXXXXXXXXXXXXXXXXXX

"Kris" wrote:

Art wrote:
nastech,

I don't know if there's a formula. However, you could put the following
macro in the Sheet you're working with:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static mRow As Long
If mRow < 0 Then
Rows(mRow).Interior.ColorIndex = xlNone
End If
mRow = Target.Row
Rows(mRow).Interior.ColorIndex = 56
End Sub


What if cells have interior.colorIndex set?

I propose to use xor to change colorindex value.

Rows(mRow).Interior.ColorIndex = Rows(mRow).Interior.ColorIndex xor 8

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
need help righting script to sort rows alphabetically then seperate them to line up [email protected] Excel Worksheet Functions 0 November 15th 05 01:23 AM
strange horizontal line showing accross several columns Thrava Excel Discussion (Misc queries) 4 June 29th 05 03:33 AM
coloring overy other line without doing so line by line gen Excel Worksheet Functions 5 April 1st 05 10:38 PM
Formatting lines between data points in a line chart ltanner Charts and Charting in Excel 2 March 13th 05 05:12 AM
Line chart - date line association gone mad! Johannes Czernin Charts and Charting in Excel 5 January 17th 05 08:48 PM


All times are GMT +1. The time now is 09:21 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"