Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
One click row highlighting
I have a table. It would be very helpful if when I click on a cell in the
table that it highlight that particular row. I don't want it to highlight it with a color or it will cover over the color conditional formatting I have, but it would be great if it would show a box around it as though I selected the entire row. Can this be done for one click only, as I have macros for individual cells that are set for double click? -- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
One click row highlighting
chip pearson has a very nice rowliner utility you can freely download.
http://www.cpearson.com/excel/RowLiner.htm if thats not you are looking for you could on a very simple level, use the worksheet selection_change event to select the required range. Something like this may do want €“ Paste behind appropriate worksheet & change selection range as required: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("A1:F11")) Is Nothing = False Then Range("A" & Target.Row & ":" & "F" & Target.Row).Select End If End Sub Do remember though that you will have to use Tab key to step through selected range to get to required cell(s). -- jb "Doug" wrote: I have a table. It would be very helpful if when I click on a cell in the table that it highlight that particular row. I don't want it to highlight it with a color or it will cover over the color conditional formatting I have, but it would be great if it would show a box around it as though I selected the entire row. Can this be done for one click only, as I have macros for individual cells that are set for double click? -- |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
One click row highlighting
Hey! This works great. I entered the range and all is well. I do have one
other question though. There is another private sub in the view code that is also called Private Sub Worksheet_SelectionChange(ByVal Target As Range). It said that there was an ambiguous error due to Worksheet_SelectionChange. I tried changing the name so that they were not the same, but didn't work. Any suggestions? -- "john" wrote: chip pearson has a very nice rowliner utility you can freely download. http://www.cpearson.com/excel/RowLiner.htm if thats not you are looking for you could on a very simple level, use the worksheet selection_change event to select the required range. Something like this may do want €“ Paste behind appropriate worksheet & change selection range as required: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("A1:F11")) Is Nothing = False Then Range("A" & Target.Row & ":" & "F" & Target.Row).Select End If End Sub Do remember though that you will have to use Tab key to step through selected range to get to required cell(s). -- jb "Doug" wrote: I have a table. It would be very helpful if when I click on a cell in the table that it highlight that particular row. I don't want it to highlight it with a color or it will cover over the color conditional formatting I have, but it would be great if it would show a box around it as though I selected the entire row. Can this be done for one click only, as I have macros for individual cells that are set for double click? -- |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
One click row highlighting
You have answered your own question - procedure name already exits.
In that case just paste the code element in to the existing procedure i.e. this bit: If Intersect(Target, Range("A1:F11")) Is Nothing = False Then Range("A" & Target.Row & ":" & "F" & Target.Row).Select End If -- jb "Doug" wrote: Hey! This works great. I entered the range and all is well. I do have one other question though. There is another private sub in the view code that is also called Private Sub Worksheet_SelectionChange(ByVal Target As Range). It said that there was an ambiguous error due to Worksheet_SelectionChange. I tried changing the name so that they were not the same, but didn't work. Any suggestions? -- "john" wrote: chip pearson has a very nice rowliner utility you can freely download. http://www.cpearson.com/excel/RowLiner.htm if thats not you are looking for you could on a very simple level, use the worksheet selection_change event to select the required range. Something like this may do want €“ Paste behind appropriate worksheet & change selection range as required: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("A1:F11")) Is Nothing = False Then Range("A" & Target.Row & ":" & "F" & Target.Row).Select End If End Sub Do remember though that you will have to use Tab key to step through selected range to get to required cell(s). -- jb "Doug" wrote: I have a table. It would be very helpful if when I click on a cell in the table that it highlight that particular row. I don't want it to highlight it with a color or it will cover over the color conditional formatting I have, but it would be great if it would show a box around it as though I selected the entire row. Can this be done for one click only, as I have macros for individual cells that are set for double click? -- |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
One click row highlighting
I have to take back what I said. It didn't work right. When I double click on
the cell with a hyperlink, the line selection is overriding it. I would rather not download the rowliner utility, but I may try it if I can't get this to work? I appreciate your help. -- "john" wrote: chip pearson has a very nice rowliner utility you can freely download. http://www.cpearson.com/excel/RowLiner.htm if thats not you are looking for you could on a very simple level, use the worksheet selection_change event to select the required range. Something like this may do want €“ Paste behind appropriate worksheet & change selection range as required: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("A1:F11")) Is Nothing = False Then Range("A" & Target.Row & ":" & "F" & Target.Row).Select End If End Sub Do remember though that you will have to use Tab key to step through selected range to get to required cell(s). -- jb "Doug" wrote: I have a table. It would be very helpful if when I click on a cell in the table that it highlight that particular row. I don't want it to highlight it with a color or it will cover over the color conditional formatting I have, but it would be great if it would show a box around it as though I selected the entire row. Can this be done for one click only, as I have macros for individual cells that are set for double click? -- |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
One click row highlighting
try adding these lines in the Worksheet_BeforeDoubleClick event
Application.EnableEvents = False 'your code Application.EnableEvents = True -- jb "Doug" wrote: I have to take back what I said. It didn't work right. When I double click on the cell with a hyperlink, the line selection is overriding it. I would rather not download the rowliner utility, but I may try it if I can't get this to work? I appreciate your help. -- "john" wrote: chip pearson has a very nice rowliner utility you can freely download. http://www.cpearson.com/excel/RowLiner.htm if thats not you are looking for you could on a very simple level, use the worksheet selection_change event to select the required range. Something like this may do want €“ Paste behind appropriate worksheet & change selection range as required: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("A1:F11")) Is Nothing = False Then Range("A" & Target.Row & ":" & "F" & Target.Row).Select End If End Sub Do remember though that you will have to use Tab key to step through selected range to get to required cell(s). -- jb "Doug" wrote: I have a table. It would be very helpful if when I click on a cell in the table that it highlight that particular row. I don't want it to highlight it with a color or it will cover over the color conditional formatting I have, but it would be great if it would show a box around it as though I selected the entire row. Can this be done for one click only, as I have macros for individual cells that are set for double click? -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
highlighting only the currently selected cell, until i click off o | Excel Discussion (Misc queries) | |||
Disabling click and right-click on the Picture I inserted in an Excel document | Excel Worksheet Functions | |||
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. | Excel Discussion (Misc queries) | |||
Click on graph bar to execute a double-click in a pivot table cell | Charts and Charting in Excel | |||
Mouse Over Graph, Capture Information on Click(Double Click) | Excel Programming |