![Smile :-)](./images/smilies/icon_e_smile.gif)
Excel - Highlighting (underlining) the active row
Re: Excel - Highlighting (underlining) the active row
glad you like it ![Smile :-)](./images/smilies/icon_e_smile.gif)
![Smile :-)](./images/smilies/icon_e_smile.gif)
Re: Excel - Highlighting (underlining) the active row
Hi Haichen,
to click through the splashimage (needed in very rare situations, eg. you select cell beyond screen) replace
with
to click through the splashimage (needed in very rare situations, eg. you select cell beyond screen) replace
Code: Select all
Splashimage,, B W%Width% H%line% Y%y1% X%x% CW%color% ; create line only on change
Code: Select all
Splashimage,, B W%Width% H%line% Y%y1% X%x% CW%color%, , , HLSplashImage ; create line only on change
WinSet, ExStyle, 0x20, HLSplashImage
WinSet, Transparent, 255, HLSplashImage
Re: Excel - Highlighting (underlining) the active row
I am using following code for the same purpose, as I do not care about undo and redo
I have changed above code used transparent colored GUI to hightlight rows
you can highlight multiple rows with different sizes as far as your selection is one part
what I mean with one part is when you press ctrl and select multiple ranges
Code: Select all
#Persistent
onexit, exitting
^a::
oExcel := ComObjActive("Excel.Application")
Sheet := oExcel.ActiveSheet
ComObjConnect(Sheet, Worksheet_Events)
return
esc::
exitapp
exitting:
oExcel.activecell.EntireColumn.Interior.ColorIndex := 0
oExcel.activecell.EntireRow.Interior.ColorIndex := 0
exitapp
class Worksheet_Events {
SelectionChange(cell) {
static Lastcell
lastcell.EntireColumn.Interior.ColorIndex := 0
lastcell.EntireRow.Interior.ColorIndex := 0
cell.EntireColumn.Interior.ColorIndex := 35
cell.EntireRow.Interior.ColorIndex := 36
Lastcell := cell
}
}
you can highlight multiple rows with different sizes as far as your selection is one part
what I mean with one part is when you press ctrl and select multiple ranges
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory
Re: Excel - Highlighting (underlining) the active row
Nice. I'm sure there are users for it.
For me, undo and redo are prerequisites.
For me, undo and redo are prerequisites.
Re: Excel - Highlighting (underlining) the active row
with second example you have the ability to redo and undo
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory
Re: Excel - Highlighting (underlining) the active row
Hi Xeo786,
that you can use a Class with ComObjConnect was new to me. Thank you.
It would be great if your script could switch to other Excel windows and the highlighting could move with the scrolling, as it does with my script.
that you can use a Class with ComObjConnect was new to me. Thank you.
It would be great if your script could switch to other Excel windows and the highlighting could move with the scrolling, as it does with my script.
Re: Excel - Highlighting (underlining) the active row
Hi and thanks for the amazing script! I'm using it daily since installed.
I can confirm that I had to use burque505's amendments to make it work in Excel 16 under Windows 10, but now it works perfectly.
Wondering whether the script could be easily changed to keep the line visible also when Excel is no longer the active window?
(I tinkered a little, trying to comment out the IF-statement checking for if hwnd:=WinActive("ahk_class XLMAIN") but that just broke the script.)
I can confirm that I had to use burque505's amendments to make it work in Excel 16 under Windows 10, but now it works perfectly.
Wondering whether the script could be easily changed to keep the line visible also when Excel is no longer the active window?
(I tinkered a little, trying to comment out the IF-statement checking for if hwnd:=WinActive("ahk_class XLMAIN") but that just broke the script.)
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: Chunjee and 184 guests