A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
>> A macro appears to be a sub within a module.
Got it in one.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Extreme novice here.. (like 6 hours in.. & on a very short deadline... bummer )
I have created a Macro (module) to handle my code, and used the Insert->action feature to invoke my Macro. However, when I go into presentation mode & click the object. The code in my Macro does not run. (I've checked this with a simple label.caption update "lblTEST")
My question is... how do I call/run (not sure the correct terminology here) my Macro? The fact that I've spent the last 45 minutes searching forums to no avail, tells me this is likely something so simple no one ever wasted time explaining it. (Historically for me, that means it's a check box option somewhere).
Any help would be greatly appreciated :)
A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
>> A macro appears to be a sub within a module.
Got it in one.
Also, thanks for the advice on how to attempt run in VB. Once I got past my initial issue of naming, I then used this to identify very unfortunate typos that wouldn't have allowed it to run.
HUGE HELPER :)
Thanks again. :)
Thanks all!
2.Thanks for the suggestion to post a couple slides. That actually sent me on the right track & I've figured out my disconnect. (which I'll post here in case anyone else in the world runs into this);.
So my presentation is extremely overcomplicated (It's a calculator), and I didn't want to post ALL that Jazz.. so I opened a blank presentation, added two labels, one object & made a macro to print "It worked".
In doing so (on this clean Slate) I realized that I didn't understand the difference between Macro's and Modules.
I thought they were one in the same, however, I see now (And please correct me if I'm wrong so that I don't send anyone else down the wrong path), A macro appears to be a sub within a module.
So in my case... I had named my Module the same as My Macro.
When I changed this, it works fine.
And yes, it didn't give me an error, it just simply seemed to ignore me :( While that's annoying now, I can totally appreciate not sitting in front of clients with bugs popping up, Though I'd hope to catch & error proof all of that before I walk in.
Thanks So Much :)
John's correct; the line he mentions will provoke an error if you compile the code (which you should always do before trying to run ANY code, if only because it saves so much time and head-scratching later).
Also, when you click on an Action button that's supposed to launch code, it only functions in slide show view (which from your question, you understand). But also in slide show view, if there's a compile error .. ie, if the code can't possibly run as-is) PPT won't show you any error messages, it'll just quietly ignore the code. Better to do that than to risk annoying/embarrassing messages in the middle of a presentation.
[and a wee turn of the knife ... it would certainly be nice if the fools who insist on warning messages about links/linked files would show us the same consideration as the VBA team does]
Don't you get an error?
The line ActivePresentation.Slides wouldn't even compile and does nothing anyway. Just remove that line and see if it helps. Otherwise you need to post a couple of slides with the macro.