xiaodai
xiaodai

Reputation: 16004

In Excel VBA, how to access subs stored in an installed Add-In?

I have create an Excel Add-In. In that add-in are some modules and let's say module1 is one them. In module1 I have a sub declared as public sub abc() end sub

In my workbook I want to be able to use the function abc defined in the add in. It doesn't seem to work!

E.g. I install the Addin so that now it appears in the VBAProject sections. I create a sub in my main workbook (this is not the add-in workbook) and have a sub called def says

sub def()
  call abc
end sub



sub def1()
  call module1.abc
end sub

Neither of these work. Please help.

Upvotes: 4

Views: 6894

Answers (1)

Lance Roberts
Lance Roberts

Reputation: 22842

You have to make sure the Add-in has a project name, then reference it through the Tools > References dialog. See this link for more details.

Upvotes: 5

Related Questions