SOLVED

Count shows 1 when nothing is selected ??

Brass Contributor

I can'r figure out why:

 

? ActiveWindow.Selection.Count

in the immidiate window shows 1 when no shape is selected !

 

When 1 shape is selected the immidiate window shows ERROR 438 - Object doesn't support this property or method !

 

When 2 or more shapes are selected the

? ActiveWindow.Selection.Count

shows the right counting of selected shapes !

 

What do I misunderstand here ?

 

 

4 Replies

@keldsor 

 

Re:  how many shapes

 

'---

'Counts the number of shapes on the sheet.

Sub xyzz()
Dim X

X=ActiveSheet.Shapes.Count
MsgBox X
End Sub

'---

 

 'Counts the number of selected shapes

Sub Morexyzz()
Dim X As Object
Set X = Selection.ShapeRange
MsgBox X.Count
End Sub

'---

 

 

Nothing Left To Lose

https://1drv.ms/u/s!Au8Lyt79SOuhZw2MCH7_7MuLj04?e=sAwbHU

(free excel programs)

????????
Is this answers to my Q ?

It is what it is.
best response confirmed by keldsor (Brass Contributor)
Solution
Stupid answer ... that's what t is !
1 best response

Accepted Solutions
best response confirmed by keldsor (Brass Contributor)
Solution
Stupid answer ... that's what t is !

View solution in original post