Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
An AddIn for a custom function | Excel Discussion (Misc queries) | |||
Calling addin Function from another workbook? | Excel Programming | |||
My addin function wont run twice. | Excel Programming | |||
Selection is set to Nothing on second run of a AddIn function | Excel Programming | |||
using a function in an addin in my vba code | Excel Programming |