ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referencing Call to Another Project (https://www.excelbanter.com/excel-programming/335961-referencing-call-another-project.html)

Phil B[_2_]

Referencing Call to Another Project
 
Hello
I am working on a VBA project where I would like to call a procedure
from another project (workbook). First, does the project (workbook) need
to be open , and even when open I am having trouble referencing the call
to the procedure. I realize I can just copy the procedure into the
current workbook, but it is a procedure I realized may be useful in
other projects and thought I would put it into personal.xls and simply
call it when needed from there. I'm sure its possible to Call it, but I
think I'm just hung up on the correct reference syntax. Any help
appreciated.

Phil B.

Norman Jones

Referencing Call to Another Project
 
Hi Phil.,

Try:

Application.Run "OtherBook.xls!MacroName"


See Run in VBA help for more details.


---
Regards,
Norman



"Phil B" wrote in message
...
Hello
I am working on a VBA project where I would like to call a procedure from
another project (workbook). First, does the project (workbook) need to be
open , and even when open I am having trouble referencing the call to the
procedure. I realize I can just copy the procedure into the current
workbook, but it is a procedure I realized may be useful in other projects
and thought I would put it into personal.xls and simply call it when
needed from there. I'm sure its possible to Call it, but I think I'm just
hung up on the correct reference syntax. Any help appreciated.

Phil B.




Norman Jones

Referencing Call to Another Project
 
Hi Phil,

Forgot to add, both workbooks need to be open.

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Phil.,

Try:

Application.Run "OtherBook.xls!MacroName"


See Run in VBA help for more details.


---
Regards,
Norman



"Phil B" wrote in message
...
Hello
I am working on a VBA project where I would like to call a procedure from
another project (workbook). First, does the project (workbook) need to be
open , and even when open I am having trouble referencing the call to the
procedure. I realize I can just copy the procedure into the current
workbook, but it is a procedure I realized may be useful in other
projects and thought I would put it into personal.xls and simply call it
when needed from there. I'm sure its possible to Call it, but I think
I'm just hung up on the correct reference syntax. Any help appreciated.

Phil B.






Phil B[_2_]

Referencing Call to Another Project
 
Norman Jones wrote:
Hi Phil,

Forgot to add, both workbooks need to be open.

---
Regards,
Norman



"Norman Jones" wrote in message
...

Hi Phil.,

Try:

Application.Run "OtherBook.xls!MacroName"


See Run in VBA help for more details.


---
Regards,
Norman



"Phil B" wrote in message
...

Hello
I am working on a VBA project where I would like to call a procedure from
another project (workbook). First, does the project (workbook) need to be
open , and even when open I am having trouble referencing the call to the
procedure. I realize I can just copy the procedure into the current
workbook, but it is a procedure I realized may be useful in other
projects and thought I would put it into personal.xls and simply call it
when needed from there. I'm sure its possible to Call it, but I think
I'm just hung up on the correct reference syntax. Any help appreciated.

Phil B.





Norman
Thank you for the response. It worked perfectly. I don't use these
user forums a lot but when I have they truely amaze me. When I look
around the world and see the state of things in general I wonder about
mankind. This may sound rediculous in repsonse to your help, but I
truely get a bit more faith in human beings. If the rest of the world
operated with the "helpfullness" and usually friendly nature of these
usergroups, I can't help but think it would be a much better place.
Again, thank you!

Phil Bourque

Norman Jones

Referencing Call to Another Project
 
Hi Phil,

I am happy that it helped.

---
Regards,
Norman



"Phil B" wrote in message
...
Norman Jones wrote:
Hi Phil,

Forgot to add, both workbooks need to be open.

---
Regards,
Norman



"Norman Jones" wrote in message
...

Hi Phil.,

Try:

Application.Run "OtherBook.xls!MacroName"


See Run in VBA help for more details.


---
Regards,
Norman



"Phil B" wrote in message
...

Hello
I am working on a VBA project where I would like to call a procedure
from another project (workbook). First, does the project (workbook) need
to be open , and even when open I am having trouble referencing the call
to the procedure. I realize I can just copy the procedure into the
current workbook, but it is a procedure I realized may be useful in
other projects and thought I would put it into personal.xls and simply
call it when needed from there. I'm sure its possible to Call it, but I
think I'm just hung up on the correct reference syntax. Any help
appreciated.

Phil B.




Norman
Thank you for the response. It worked perfectly. I don't use these user
forums a lot but when I have they truely amaze me. When I look around
the world and see the state of things in general I wonder about mankind.
This may sound rediculous in repsonse to your help, but I truely get a bit
more faith in human beings. If the rest of the world operated with the
"helpfullness" and usually friendly nature of these usergroups, I can't
help but think it would be a much better place. Again, thank you!

Phil Bourque





All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com