Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Add-In 1

Status
Not open for further replies.

vza

Programmer
Aug 1, 2003
179
US
I have recently installed an Excel Add-in for a third -party software package needed to retrieve data. I want to be able to automate/run this Add-in from a Macro written within VBA. I know that VBA can be used to Load Add-Ins, but is there any way VBA code can be used to physically run an Add-in application. I want to be able to automate this process and have it run and return data with the touch of a button....Any responses would be greatly appreciated.
I tried to record a Macro as well but to no avail (the Macro displayes nothing)...If there was even a way to access menu options on the Toolbar, that would be a start....

Thanks
-vza

 
You should be able to use one of the following --

Application.Run "customaddin.xla"!addinprocname"

or

call addinprocname
 
gizzy,
This what I inserted into my Macro code:

Application.Run "PITrendXL.xla"!Pi-DataLink"

I got an error for end of statement....also my workbook had now disabled macros (after commenting out statement Macro will no longer run...How do I re-enable Macros for this worksheet??

Thanks
-vza
 
It is third party software....I dont think I can figure out the Procedure/Function name....Does that mean there is nothing I can do??

Thanks
-vza
 
Make sure that the macro is not just halted for debugging purposes. From the VB editor click on the stop symbol, otherwise, the only way that I know to re-enable macros is to verify that the securty setting is on medium and reopen the spreadsheet.

The end of statement error probably came from the quotation mark in the middle (my bad).
 
vza,

1. In the VB Editor, click on the add-in (not open it, it's probably password protected) and press f2 to bring up the object browser.

2. In the dropdown box at the top of the object browser, select your add-in and it will then only show you the classes and members that are contained within the 3rd party (or internal) add-in's.

Hope this helps
 
I do not know the procedure names/functions to run the particular options of this add-in beacuse I didnt not create it myself and its coding requires a password to view...I dont really think ther is much more I can do...
Any ideas?

Thanks for your effort.


Thanks
-vza
 
u just answered my question...sorry...forgot to refresh...I'm glad I gave you a star...I will try that and let you know.

Thanks
Lots!

-vza
 
Everything worked out great...thanks!

-vza
 
So basically an Add-in MUST be installed into excel in order to use the line

Application.Run "customaddin.xla"!addinprocname"

is there no way to simply provide a path so that a program can simply retrieve the procname from that add-in without installing it, if not then how would it install the add-in automatically?
 
Luis,

In order for the procnames to be available to the vba editor, it would need to be installed. I've never tried it, but if you already know the procname that you are trying to use and any parameters that it may require, I think that you should be able to give the path to the xla file in the application.run command.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top