I have Worksheet_SelectionChange function. In the first line I wanted to condition that if more than 1 cell is selected then exit.
I wrote:
If Target.Cells.Count > 1 Then Exit Sub
However, when I select the whole worksheet, I get an error message: "Run time error 6 - Overflow"
It seems like Target.Count can't handle such large numbers ?
What can I do to get around this?
CountLargeis what you need. msdn.microsoft.com/en-us/library/office/…