For Each wb In Workbooks
If ucase(left(wb.name,1) )= "Z" Then
'your code
End if
Next wb
--
Steve
"pls123" <(E-Mail Removed)> wrote in message
news:14C4DBF0-5535-4933-9663-(E-Mail Removed)...
> 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 !!
|