Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default 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 !!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default 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 !!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default 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 !!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I call up a line of code that references a cell/range in theactive workbook workbook where I am running my macro from? Lav Excel Programming 2 November 11th 08 05:04 PM
need macro to call a workbook w/o the actual name of the workbook Jon Peltier Excel Programming 0 December 18th 06 10:01 PM
Call macro stored in Excel workbook from Outlook's macro Gvaram Excel Programming 0 October 4th 06 05:47 PM
Call Macro from another WorkBook? Steven M. Britton[_2_] Excel Programming 6 June 10th 05 04:33 PM
Call a macro in other workbook Davwe[_4_] Excel Programming 2 December 17th 03 08:14 PM


All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"