Exit worksheet selection if more than 1 cell selected

  • Hi,
    I have a slight problem with a Worksheet_SelectionCharge event. I would like to exit the sub if more than one cell is selected. I am using use:

    If Target.Cells.Count > 1 then Exit Sub.

    It works fine for a relatively small number of cells being selected but if I select the entire sheet I receive a Runtime Error # 6: Overflow situation before it will exit the sub. I have tried stepping over this with Resume Next and GOTO 0 catches. Any ideas on how this can be worded to prevent the overflow?

    Thanks in advance,


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!