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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top