Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Count selected Objects

I have simplified this issue.

I have several objects selected, and I want vb code to return the number of
selected objects. Any dieas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Count selected Objects

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Selected Objects Clara Excel Worksheet Functions 4 June 28th 09 06:00 AM
formula 2 display selected objects ONLY in new sheet from another Andrew Langner Excel Worksheet Functions 1 February 5th 09 01:31 AM
how to find if multiple chart objects are selected? Chimanrao Excel Programming 2 March 23rd 06 01:14 PM
Deleting shapes/objects from a selected area Tim Excel Programming 1 October 23rd 04 01:00 AM
Deselect two objects after all selected Cutter[_14_] Excel Programming 3 August 8th 04 02:53 AM


All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"