Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default run addin function from macro

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default run addin function from macro

thanks jim,
so you mean to say that if my addin name is sofesticate and the file name is
sofesticate.xla
then the command i need to use is
Application.run("sofesticate.frmappendtable")

"Jim Thomlinson" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default run addin function from macro

Sorry. When I re-read that it is a little misleading. You still want to
rename your project. In project explorer right click the project and in
properties rename the project to something meaningful like sofesticate. Now
you can use the code that you have. Note that you need to have a procedure to
show your form...
--
HTH...

Jim Thomlinson


"darsg" wrote:

thanks jim,
so you mean to say that if my addin name is sofesticate and the file name is
sofesticate.xla
then the command i need to use is
Application.run("sofesticate.frmappendtable")

"Jim Thomlinson" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
An AddIn for a custom function FARAZ QURESHI Excel Discussion (Misc queries) 3 October 16th 07 02:35 PM
Calling addin Function from another workbook? thinkingfield[_8_] Excel Programming 1 November 11th 04 03:39 AM
My addin function wont run twice. Ben Crinion Excel Programming 3 October 14th 04 11:28 AM
Selection is set to Nothing on second run of a AddIn function Ben Crinion Excel Programming 1 October 12th 04 02:07 PM
using a function in an addin in my vba code archangel Excel Programming 2 September 6th 03 08:09 AM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"