delete shapes

M

mikeFin

Somewhere I saw this code:

For I = shpsObj.Count To 1 Step -1
Set shpObj = shpsObj.Item(I)
shpObj.Delete
Next I


But it in Visio 2007 it looks like there is no "Item" available.
How could this be done?
 
J

John Goldsmith

Mike,

I wonder if you have declared the variable (ie Dim shpsObj as Shapes). If
you haven't you might not get intellisense on the object and so it might
appear as if you're not getting the expected methods and properties.

Anyway, as Al says, you don't need the word 'Item' as this is the default
property of the collection object.

Best regards

John


John Goldsmith
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk
 
Top