RibbonX - macro won't run

M

Maurice

Hi there,

Hope that someone can point me in the right direction here:
using...
Win Vista-Enterprise
Office 2007 enterprise

Situation:
I've created a word document (.docm) and revised the .rels file and customUI
file as described my Microsoft in the sample documentation on this subject.

When I start my document all is well and I see the ribbon has changed to one
tab showing the Happy Face button. In the word document I've added the
following as described my MS:

sub MyMacro (Byval control as IRibbonControl)
msgbox "Hello World"
end sub

Now when I push the button I get the message that the security settings
don't allow me to run the macro. Go to the Trustcentre and enable all
macro's. That's what I've done but still no go keep getting the same message.

What's bugging me here? any suggestions appreciated...
 
M

Maurice

Never mind, my mistake.
Instead of "ThisDocument.MyMacro" I had "ThisWorkbook.MyMacro".
Got it working now.

That's what you get when working with 2 apps. at the same time
I'll be in the corner taking the penalty.. ;-)
 

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