-1

I am trying to open multiple webpage tab from my selected cells. I would like to find the selected cell (based on the mouse) starting and ending row and column information for further use of vba macro.

Thanks in advance...

Swarnali
  • 1
  • 1
  • 1
    `ActiveCell` refers to the active cell and `Selection` refers to the selected cell (or range of selected cells) -- but if you are using `Select` and similar things, you are probably writing bad code. See [How to avoid using Select in Excel VBA](https://stackoverflow.com/q/10714251/4996248) – John Coleman Jul 16 '20 at 11:43

1 Answers1

0

You can do this:

x = ActiveCell.Address
MsgBox (x)

but really, you should try to avoid using selection where possible. The reason for this is because users can (and I've found, will) click in to other spreadsheets as the code is running and so what you have intended as the selection, may no longer be the actual selection. It also affects the longevity of the code because it's much more difficult to fix if something breaks.