This example displays a message if the user tries to carry out a command when more than one area is selected. This example must be run from a worksheet.
If Selection.Areas.Count > 1 Then
MsgBox "Cannot do this to a multi-area selection."
End If