PowerPoint macro works but not in add-in

J

jpr3

I have written PowerPoint VBA code that works in any presentation (it
calls a UserForm to show). I have written VBA code that will
automatically call this code whenever ANY presentation is opened
(Auto_Open) and saved it to a .PPA file. But while the macro works, it
doesn't work in the Add-In. What could I be doing wrong?

Here is some code from my AutoOpen macro:
With MyButton2
..Caption = "Style1"
..TooltipText = "Style1"
..OnAction = "Style1"
.Visible = True

I would appreciate any help that you could give me.
 
J

John Wilson

You will have to tell us more about the code before we can all help you!

You might also add....
Is the macro you want to run called " sub style 1"?
Did the addin compile OK?
Does the button appear?
 
B

Bill Dilworth

His original post, on my system only had single dots. Most weird. We've
seen this before in the NGs, extra periods sometimes, I mean.

Depending on the code that comes before, this is probably meant to address
some of the details on a newly created button on a toolbar. We'd have to
see what comes before to inform you if MyButton2 was correctly defined and
created.

When this command is fired, it should fire the Sub routine Style1 in the
module section of your code. Where is the code for Style1 located?


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 

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