Of course but the correct vba would be:

[VBA]Dim osld As Slide
For Each osld In ActivePresentation.Slides
'do whatever
next osld[/VBA]