Share via

Powerpoint 2013 Macro - doesn't run

Anonymous
2016-02-21T05:02:38+00:00

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 :)

Microsoft 365 and Office | PowerPoint | For home | Windows

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.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2016-02-22T01:29:03+00:00

    >> A macro appears to be a sub within a module.

    Got it in one.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-02-21T20:07:22+00:00

    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. :)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-02-21T18:54:35+00:00

    Thanks all!

    1. Thanks for pointing out that line.. remnants of a failed line found on another forum.

    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 :)

    Was this answer helpful?

    0 comments No comments
  4. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2016-02-21T16:22:03+00:00

    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]

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2016-02-21T11:52:09+00:00

    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.

    Was this answer helpful?

    0 comments No comments