Count shows 1 when nothing is selected ??


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



Re:  how many shapes



'Counts the number of shapes on the sheet.

Sub xyzz()
Dim X

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!Au8Lyt79SOuhZw2MCH7_7MuLj04?e=sAwbHU

(free excel programs)

Is this answers to my Q ?

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