View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Count selected Objects

It won't understand selection.count if only one shape is selected. So:

Dim s as String
on Error resume Next
s = selection.Name
On error goto 0
if s = "" then
goto Multiple
else
' only one selected
end if

--
regards,
Tom Ogilvy


"Mike" wrote:

I have this:

Selection.Count
If Selection.Count 1 Then
GoTo MultipleObjects
Else
End If

Does not seem to understand Selection.Count


"Mike" wrote:

I have simplified this issue.

I have several objects selected, and I want vb code to return the number of
selected objects. Any dieas?