With the help of this forum, in the past I created a Select Case statement based on which key or combination of keys were pressed when a macro is launched. Originally the macro launched from a button.
I’m trying to modify some SelectionChange code to behave differently depending upon which button was pressed when the selection was changed. Big picture it’s working as intended, passing the variable I need in the ThisWorkbook module to differentiate the code.
The one problem I haven’t been able to solve is the normal Excel behavior when you hold down Shift/Ctrl/Alt and clicking on a second cell on a worksheet. I really prefer to use the Shift key for my plan, but that highlights a cell range rather than just the cell I click on. I was hoping that Target.Address would give me the cell clicked address, but unfortunately it returns the highlighted range. Either the Alt key or Shift+Ctrl appear to work, but I’d really prefer to just the single Shift key. You can see the (mis)behavior in the attached workbook by clicking on different cells, with different keys depressed.
Any ideas how to use the Shift key in this context and have it only select the specific cell clicked?
Thanks for reading and any ideas?
Bookmarks