In VBA How can I detect slide switching

J

John Crawford

I have a standard presentation first page that I use with all of my
presentations. However it is quite boring. Using VBA I randomly place
lines and shapes on the slide. Works great.
Now the problem. When I move forward in the presentation, the
function continues to run. I have set it up as an infinate loop, so I
know why it is still running. I have tried to find some event in the
presentation that I can use to stop the loop. However I cannot find one.
Since a click, or 'page down' do the switching, there must be a way.
If anyone can point me in the right direction it would be appreciated.
While I am on the same topic, is there a way to automatically start
a macro when the presentation starts? Currently, to start my display, I
am using a macro linked to an object on teh slide. Again it works ok,
but an automated process would be best.
I am using Powerpoint/Office 2000.
Any help would be appreciated.
Thanks in advance
John Crawford
 
J

John Crawford

Steve:
Thank you very much. I had thought of using an object (actually the
same object that started the process, but checking the state of a global
variable to see whether to start or stop the process.), but thought
there must be another way.
I had also seen some information on the Class module and was trying
to figure out how to use it. I will look at the samples and see how to
make them work. There may be other things that would be useful to have,
and understand.
John Crawford
 
J

John Crawford

Steve and Shyam:
I solved the problem. I used the pptEvent sample to understand how
to set up the class module. I then added code for the SlideShowNextSlide
event (it seems tio be called by next, previous, and Go). I use that to
check a global variable, and if set (Animation is active) I stop
animation. I use an object on teh first slide to start the animation.
Since the animation changes the presentation, I am asked at the end
of the PPshow if I want to save changes. I changed the SlideShowEnd
event to set the presentation .Saved to true, that way I do not get the
message, and the presentation just ends.
Thank you both for pointing me in the right direction, and the
excelent example.
John Crawford
 

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