Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have different VBA procedures in different workbooks and I need to call a
procedure from one workbook to another. How can I do this? How is the right syntaxis? I appreciate any help. -- Jorge De la Rosa |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.Run "'another book2.xls'!test_msgbox"
as an example -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Jorge De la Rosa" wrote in message ... I have different VBA procedures in different workbooks and I need to call a procedure from one workbook to another. How can I do this? How is the right syntaxis? I appreciate any help. -- Jorge De la Rosa |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for you help!.
It worked well -- Jorge De la Rosa "Bob Phillips" wrote: Application.Run "'another book2.xls'!test_msgbox" as an example -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Jorge De la Rosa" wrote in message ... I have different VBA procedures in different workbooks and I need to call a procedure from one workbook to another. How can I do this? How is the right syntaxis? I appreciate any help. -- Jorge De la Rosa |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another method is to set a reference from the workbook that needs to call
the function to the workbook that contains the function. In the VBA editor, open the workbook that contains the functions. Go to the Tools menu and choose "VBA Project Properties". In that dialog, change the name from "VBAProject" to something meaningful, like "MyFunctions". Save that workbook. Then open the workbook that is going call upon the functions, go to the Tools menu, choose References, and select "MyFunctions" in the list. Once you have that reference in place, you can call functions in the "MyFunctions" project as if they were native VBA functions, without any qualifiers. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Jorge De la Rosa" wrote in message ... I have different VBA procedures in different workbooks and I need to call a procedure from one workbook to another. How can I do this? How is the right syntaxis? I appreciate any help. -- Jorge De la Rosa |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your help. I already try this way and work fine.
-- Jorge De la Rosa "Chip Pearson" wrote: Another method is to set a reference from the workbook that needs to call the function to the workbook that contains the function. In the VBA editor, open the workbook that contains the functions. Go to the Tools menu and choose "VBA Project Properties". In that dialog, change the name from "VBAProject" to something meaningful, like "MyFunctions". Save that workbook. Then open the workbook that is going call upon the functions, go to the Tools menu, choose References, and select "MyFunctions" in the list. Once you have that reference in place, you can call functions in the "MyFunctions" project as if they were native VBA functions, without any qualifiers. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Jorge De la Rosa" wrote in message ... I have different VBA procedures in different workbooks and I need to call a procedure from one workbook to another. How can I do this? How is the right syntaxis? I appreciate any help. -- Jorge De la Rosa |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calling procedures from within VBA | Excel Programming | |||
Event procedures: who is calling? | Excel Programming | |||
Calling Procedures in other Projects | Excel Programming | |||
Calling procedures in .xla projects | Excel Programming | |||
Calling Procedures | Excel Programming |