View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default run addin function from macro

One way...

I assume your addin is still code named VBA Project. Change this to
something meaningful by going to the Properties of the Project (Right Click
the VBA Project and select VBA Properties and change the Project Name). Now
in your spreadsheet that you want to run the code from the addin Select Tools
- References and create a reference to the Addin (it will be listed near the
top of the possible references). You can now directly access the functions
and procedures of the addin by just calling them in your code.
Call MyAddin.Procedure

Note that this uses early binding (creating a reference at design time) so
this spreadsheet will not be happy on machines without the addin. If you
intend to distribute the book then you probably want to use.
Application.run("Myaddin.Myprocedure")
Which is another way to call a procedure from the addin...
--
HTH...

Jim Thomlinson


"darsg" wrote:

I have got an addin installed which open a vb form and on that form there is
an ok buttion which i have to click to run my defined procdure.

what i am trying to do is schedule an application to run everyday at 2:00
A.M. , but for that i have to run that macro on an open workbook , how can i
call that command button to run when i open that workbook.

thanks