PDA

View Full Version : How to access the methods of .xla from VBA?



gopi09_m
09-24-2009, 10:04 PM
Hi

I could able to access functions of a .xla(addin)(its getorder.xla) from Excel cells.How do i get the same functions from VBA?

I can't see them accessible from VBA.

Jan Karel Pieterse
09-25-2009, 12:43 AM
From your vba project, select Tools, references and find the xla (hope they did not forget to change its name to something else than VBAProject).

Bob Phillips
09-25-2009, 01:53 AM
Or you could use Application.Run.

gopi09_m
09-28-2009, 01:13 AM
No.It doesn't work.

Bob Phillips
09-28-2009, 01:17 AM
What doesn't?

gopi09_m
11-12-2009, 05:30 AM
I can only see methods available in excel cells only.not in any other way(like from .xla addin)

Bob Phillips
11-12-2009, 05:38 AM
You need to give a lot more detail as to what you are doing, have done, and what you are getting.

Jan Karel Pieterse
11-12-2009, 05:40 AM
What is the name of the vbaproject of the addin?

If it is VBAProject I think you are out of luck. Unless you can name the project of the addin yourself (Select a module in the addin and choose Tools, VBAProject properties. Enter a unique name for the project and save he addin).

Now you can access the addin by checking the vbaproject's name you just gave it in tools references. In code, you run a sub in that project like this:

NewVBAProjectName.SubInNewVBAProjectYouWantToRun [arguments...]