VBA- ShapeRange.Count error

M

Mel

PPT 2003/2007

In VBA, when using ShapeRange.Count, who how do you prevent or handle
the error "... nothing selected" when the user has no shapes selected
when the macro fires? I can't get it count it as 0.

That and more specifically, when using ShapeRange.Count inside a
WindowSelectionChange event and the user deselects all shapes, it
errors as described above. How can I prevent that?

Thanks,
Melina
 
C

Chirag

Use the Type of selection to determine what has been selected. When no
shapes are selected, the Sel.Type will be either ppSelectionNone or
ppSelectionSlides. Do not access the Sel.ShapeRange object for these cases.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
Top