PDA

View Full Version : Cant access functions from a VBA add in



Andy84
06-14-2014, 02:40 AM
Hi

I have received an excell add in containing VBA code. I have installed the add in, so that when i open excel and press Visual Basic tab then i can see all the code. However when I chose a cell in excel and start typing in the name of a function from the add in then the relevant function doesnt show up. What sohuld I do?

Thanks
Andy

westconn1
06-14-2014, 03:16 AM
are the functions public?

Andy84
06-14-2014, 03:26 AM
Yes, in the VBA code all functions start with "public function" if thats what your asking.
Thanks

snb
06-14-2014, 04:06 AM
Are those functions in a macromodule in the AddIn ?

Andy84
06-14-2014, 04:10 AM
Yes they are in a module
thanks

Paul_Hossler
06-14-2014, 06:07 AM
Try this in the cell on the worksheet and see if it works ..



=MyAddin.xlam!MyFunction(b2)

or if there are spaces

='My Addin has spaces.xlam'!MyFunction(b2) (I think that's the proper format)

xld
06-14-2014, 06:27 AM
Does the module have Option Private Module at the top?

Aflatoon
06-16-2014, 12:47 AM
Which version of Excel do you have?