Either Macro or VB

  • Thread starter Thread starter Phil K
  • Start date Start date
P

Phil K

ppt Ver. 2000. I'm trying to have a macro start
automatically when I go from one slide to the next. I
have two slides, on the first I have an action button to
go to the next slide. On the second slide I need to
activate a macro automatically that will clear labels
that were created using VB. I could use another action
button or a command button but I would prefer to use the
macro. ... Phil
 
Why not assign the code to a macro that does it then goes to the next slide.
For example, you can have a macro assigned to a button that hides TextBox1
or sets the text of Textbox1 to nothing, then moves to that slide:

Sub MoveToSlide3()
ActivePresentation.Slides(3).Shapes("TextBox1").TextFrame.TextRange.Text
= ""
ActivePresentation.SlideShowWindow.View.GotoSlide (3)
End Sub

Keep in mind that this works for a regular textbox that you name TextBox1,
not a textbox from the Control Toolbox. The code for that is slightly
different. If you want to see that one, check out the following link:

http://www.mvps.org/skp/ppt00042.htm

I also have some info on my site about keeping score in PowerPoint, but it
has a couple of examples that might help:

http://www.pttinc.com/ppt_faq1.html
 
Thanks Shyam .. Will try it on a machine at work. A
little chicken to try it on my home unit based on the
disclaimer.
 
Thanks Bill. ... Phil
-----Original Message-----
Why not assign the code to a macro that does it then goes to the next slide.
For example, you can have a macro assigned to a button that hides TextBox1
or sets the text of Textbox1 to nothing, then moves to that slide:

Sub MoveToSlide3()
ActivePresentation.Slides(3).Shapes ("TextBox1").TextFrame.TextRange.Text
= ""
ActivePresentation.SlideShowWindow.View.GotoSlide (3)
End Sub

Keep in mind that this works for a regular textbox that you name TextBox1,
not a textbox from the Control Toolbox. The code for that is slightly
different. If you want to see that one, check out the following link:

http://www.mvps.org/skp/ppt00042.htm

I also have some info on my site about keeping score in PowerPoint, but it
has a couple of examples that might help:

http://www.pttinc.com/ppt_faq1.html
--
Bill Foley, Microsoft MVP (PowerPoint)
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
"Success, something you measure when you are through succeeding."




.
 
Back
Top