ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transferring control from macro in one workbook to macro in anothe (https://www.excelbanter.com/excel-programming/404280-transferring-control-macro-one-workbook-macro-anothe.html)

Andyjim

Transferring control from macro in one workbook to macro in anothe
 
I am including the entire macro, but it is the last 3 lines that I am
concerned about. Basically, by the time the macro gets to that point, 2
workbooks are open. I am running the macro from the User workbook. But I
want to go to the module in the Dev workbook and use the Update3 macro in.

When I now run the macro, the error states that it can't find Update3 (which
is in the Dev file.

How do I tell Excel to go the the module in Dev file that has Update3?

Thanks much.

Nigel[_2_]

Transferring control from macro in one workbook to macro in anothe
 
Application.Run ("yourfilename.xls!yourmacroname")


--

Regards,
Nigel




"Andyjim" wrote in message
...
I am including the entire macro, but it is the last 3 lines that I am
concerned about. Basically, by the time the macro gets to that point, 2
workbooks are open. I am running the macro from the User workbook. But I
want to go to the module in the Dev workbook and use the Update3 macro in.

When I now run the macro, the error states that it can't find Update3
(which
is in the Dev file.

How do I tell Excel to go the the module in Dev file that has Update3?

Thanks much.



Andyjim

Transferring control from macro in one workbook to macro in an
 
Thanks Nigel. That worked!

"Nigel" wrote:

Application.Run ("yourfilename.xls!yourmacroname")


--

Regards,
Nigel




"Andyjim" wrote in message
...
I am including the entire macro, but it is the last 3 lines that I am
concerned about. Basically, by the time the macro gets to that point, 2
workbooks are open. I am running the macro from the User workbook. But I
want to go to the module in the Dev workbook and use the Update3 macro in.

When I now run the macro, the error states that it can't find Update3
(which
is in the Dev file.

How do I tell Excel to go the the module in Dev file that has Update3?

Thanks much.




All times are GMT +1. The time now is 05:55 AM.

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