I can't comment yet (not enough reputation, 0 to be precise, no clue what I'm doing here). However, as it took me hours to figure this out, I'm leaving this here:
I have slides with >256 shapes.
Fails: When using the sl.Shapes(myshapeName) approach voted high above, it fails when I'm testing for a shape that was created late (its number is then >256). It WON'T be found ever.
Works: Using the (likely way less efficient/elegant) way of looping through all names, my shape is properly detected.
I found this by looking at the "local" window in VBA editor onyl, setting a hold point, then looking for the properties listed for the slide object. It shows that there are say 279 shapes on the slide, however, further down where it enumerates all the shape objects, it only shows IDs 1 through 256. This triggered me.
Probably every expert knows, or it is documented somewhere, but I'd never have guessed there might be a (low) limit here.