• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

I created an add-in but am having difficulties accessing the macro after install

C

cau83

Guest
I am creating some macros that need to be used across many workbooks. Over time, there may need to be changes so I wanted to put them in an add-in so they could be updated once rather than having to remove and copy back in the updated modules.


The add-in is created and in the VBE I can run the macro and it works. However I do not see it when I open the 'run macros' prompt, nor can I add it by right-clicking on a button because it is not listed when I choose 'assign macro.'


These macros need to be triggered by buttons. I have a workaround, which is to create a small sub for every single button that links to the add-in:

Sub Button2_Click()

Application.Run "UpdateRight"

End Sub


But I really don't like this because it will be time-consuming to do this for each button and not easy to edit on the fly for a particular button.


What do I need to do to have these macros show up along with my other macros (ones saved in the workbook or those from my personal workbook)?
 
Hi, cau83!

Should this help?

http://chandoo.org/forums/topic/problem-in-installing-addins

Regards!
 
If the add-in is open then the procedures in it should be visible. Since you're able to call UpdateRight from a command button (I assume in another workbook) then the first two things that spring to mind are:

--Is there an Option Private statement at the top of the code module in the add-in which contains the UpdateRight() procedure?

--Does UpdateRight() have any Optional parameters?
 
Hi ,


The following link :


http://fontstuff.com/vba/vbatut03.htm


describes one specific case :


QUOTE


Assigning Add-In Macros to Custom Toolbar Buttons and Menu Items

Add-Ins aren't just for containing functions. They may contain useful macros. You may want to assign a macro that is contained in an Add-In to a custom toolbar button or custom menu item.


Normally to do this you would right-click on your new button or menu item and choose Assign Macro and pick your macro from the list provided. However, the names of macros contained in Add-Ins are not shown in the list. Don't worry! Just type the name of the macro in the Macro Name: box at the top of the dialog. Excel will find it and the macro will run as expected when the button is clicked or the menu item chosen.


UNQUOTE


Have you tried this ?


Narayan
 
SirJB7: I have been able to install but thanks.


Colin: I do not have Option Private. I think you're saying that if I did, it would be a potential cause of the problem?


Narayank: That worked! Specifically, when I click assign macro, I just type the macro name as given in the add-in code and excel picks it up and assigns correctly.


thanks for your help. I'm glad I came back to check this.
 
Back
Top