Say in a region of an Excel sheet you have a couple blue cells, a couple red cells, some cells with fancy conditional formatting bargraphs, and whatever. Then you ctrl-select the region.
So what you see is a faint blue highlight or transparency over the entire area selected, and the preexisting blue and red and graphed cells go slightly darker/lighter. And if you change your selection or hit ESC then you goes back to seeing what you saw befaw.
So my question is how to do that kind of highlighting myself in VBA using the sheet event selectionchange? Is it a matter of some formula that allows adding or subtracting values from the RGB of the cell interior color? I am interested in the kind of selection
coloring that appears when doing multiple selections - that is, I don't care about the cell borders.
I don't know of any such built-in functions, but you can code a workaround.
Select some representative cells, then press Ctrl+Print Screen to get a picture of the screen. Paste in MS Paint, and use the 'Pick Color' tool t select the cell color. Go to Colors>>Edit Colors... >>Define Custom Colors to get the exact RGB
values of various cells.
If you compare highlighted vs. unhighlighted cells I'm sure you can figure out a pattern.
Finally, to simulate that 'selection effect', modify the color of the desired range. For example: