![]() |
Call macro from other workbook
hi all !!
i know this command for calling a macro from another workbook.. Application.Run (Macrobook!Macroname) now.. i need a more complex task.. i need to call the macro "MyMacro" .. in all the open workbook that have it .. or , in all the workbooks wich name begins with Z, for example.. ...open workbooks change name every week, because i change some, so i cant correct code evry time, and i need any wild character like *.* doing the work for me... is there any way for doing that ?!? that would give to my work right control of flux. ty !! |
Call macro from other workbook
For Each wb In Workbooks
If ucase(left(wb.name,1) )= "Z" Then 'your code End if Next wb -- Steve "pls123" wrote in message ... hi all !! i know this command for calling a macro from another workbook.. Application.Run (Macrobook!Macroname) now.. i need a more complex task.. i need to call the macro "MyMacro" .. in all the open workbook that have it .. or , in all the workbooks wich name begins with Z, for example.. ..open workbooks change name every week, because i change some, so i cant correct code evry time, and i need any wild character like *.* doing the work for me... is there any way for doing that ?!? that would give to my work right control of flux. ty !! |
Call macro from other workbook
hi steve ! ty ! i will test this soon !!
"AltaEgo" wrote: For Each wb In Workbooks If ucase(left(wb.name,1) )= "Z" Then 'your code End if Next wb -- Steve "pls123" wrote in message ... hi all !! i know this command for calling a macro from another workbook.. Application.Run (Macrobook!Macroname) now.. i need a more complex task.. i need to call the macro "MyMacro" .. in all the open workbook that have it .. or , in all the workbooks wich name begins with Z, for example.. ..open workbooks change name every week, because i change some, so i cant correct code evry time, and i need any wild character like *.* doing the work for me... is there any way for doing that ?!? that would give to my work right control of flux. ty !! |
All times are GMT +1. The time now is 03:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com