View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Héctor Miguel Héctor Miguel is offline
external usenet poster
 
Posts: 434
Default If Selection is one cell

hi,Art !

Hoe do I write the code, if the selection is anything but one cell
So if I select a range all thew whole page, or a tab or a button etc.
it should ignore everything, only when I select one cell then it should do ...


i.e.

Sub mySub()
If TypeName(Selection) < "Range" Then Exit Sub
If Selection.Count 1 Then Exit Sub
MsgBox "What's next ?", , ""
End Sub

hth,
hector.