Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
which line mercy script
Going Blind... is there a code for hiliting a row when any cell in that line
is selected. Thanks............. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need help righting script to sort rows alphabetically then seperate them to line up | Excel Worksheet Functions | |||
strange horizontal line showing accross several columns | Excel Discussion (Misc queries) | |||
coloring overy other line without doing so line by line | Excel Worksheet Functions | |||
Formatting lines between data points in a line chart | Charts and Charting in Excel | |||
Line chart - date line association gone mad! | Charts and Charting in Excel |