Declaring inside a sub means that the variable is only valid in that sub and that every time the sub runs it is set to Nothing / Null / zero. The general rule would be declare outsibe the sub if you want to use them in multiple subs. Typical example would be to have one sub that keeps a score and then l;ater a second sub that tells you the total schore.
My guess is that oeff in your code needs to be set to Nothing to make it stable (this is probably either a bug or a timing issue)
There really isn't a perfect vba book for PPT. Powerful PowerPoint for Educators is really the only one. There are lots of examples on their website from the book.
Best way to learn in my experience is to ask people "How do I do this ..." or to study examples
There are quite a few on our site in the vba section and also more on Steve Rindsberg's site in Programming Section
http://www.pptalchemy.co.uk/powerpoi...rials.html#vba
http://www.pptfaq.com




Reply With Quote