Hi folks,
Anyone know how to run a macro automatically when an individual slide opens during a Show – i.e. VBA command?
Can do this with click’able hyperlink obviously, but can it be done automatically?
Thanks in advance,
Ade
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS PowerPoint and presentation apps » Run a Macro on Slide Open (PP97)
Don’t know about automatically, but you can improve on the ‘clickable’ hyperlink by setting up a ‘mouse over’ hyperlink.
Make sure your macro exists in PowerPoint.
Draw rectangle over the whole slide; with the rectangle selected, click on Slide Show | Actions Settings and click on the mouse over tab. Set it up to run the macro, OK it and then change the rectangle properties to No Fill and No Line.
Now, when the slide show is running, you can just shake the mouse to wake up the pointer and it will run the macro (because the whole slide is ‘active’ because of the invisible rectangle)
Not quite what you wanted, but it might help.
Cheers
Thought of this last night. If the unit may not even have a mouse (or keyboard?), how are you going to start/run the computer or presentation? I’ll assume you have that figured out.
I also realize this may miss you entire point as to run a macro upon viewing a certain slide. You may want to post this in the VBA forum.
So, Why not set up the presentation the way you want it to run, including looping and save it as a “PPS” file. Then place a shortcut to that file in the starup folder? This way when the computer boots, your presentation would run.
That’s a distinct possibility – but, likewise, I’m an Access and Word VBA chap and don’t know the PP module well either.
I may give it a go, but the slide in question is, in effect, an add-in – i.e. I’m designing an info request user form that links to backend database; I intend for it to be made available to anyone in our company that wants to use it. Hence, I won’t know what slide number it will be in their presentations?
Thanks for your help.
Ade
In trying to piece together your true final product, I understand that you’re trying to run a presentation in a Kiosk, most likely without any other human intervention. Yet at a given point, the last slide at this point, you want to ‘branch’ somewhere else. It sounds like this is a base presentation design that various other departments will use in different ways, thus have a different slide count. Is that up to date?
What is this other data you’re jumping to?
Why can’t you use a touch screen and put a hyperlink on the last page? There are several manufacturers that produce touch screen monintors as well as companies like ">Javelin Computers that produce touch screen PC’s.
The next thought would then be to build a larger “one roof” application and allow users to use the touch screen to navigate.
In order…
Yes, you’re spot on.
Access Database to record information requests from viewers of the presentation.
Touch screens are very “nice”, but beyond the realms of our company.
Thanks for your ideas, but I think I’m going to stick with a clickable/mouse-over hyperlink.
==================
Unless anyone knows the VBA code for what I need…then I think we’ve exhausted this thread – it appears to be beyond the PP VBA module.
Many thanks and until next time…
Regards,
Ade
It would appear that PP does not expose the slide event in VBA (see this post).
Ade
I’m taking this from the help file in PPT:
SlideShowWindow Property Example
The following example shows the Click event procedures for buttons named “cmdBack” and “cmdForward”. If you add these buttons to the slide master and add these event procedures to them, all slides based on the master (and set to show master background graphics) will have these navigation buttons that will be active during a slide show. The Me keyword returns the Master object that represents the slide master that contains the control. If the control were on an individual slide, the Me keyword in an event procedure for that control would return a Slide object.
Private Sub cmdBack_Click()
Me.Parent.SlideShowWindow.View.Previous
End Sub
Private Sub cmdForward_Click()
Me.Parent.SlideShowWindow.View.Next
End Sub
This sounds a little like want you wanted to do and yes, I was able to put command buttons on the master that would run the macro while in the slide show.
BTW once you place the command buttons on the master – the master object is visible (exposed?) in the Visual Basic Editor.
Cheers
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications