Can anyone
Macros that take arguments are not 'runnable" other than through other code.
For example, you can pass a workbook object to your sub by using one of the
line from something like this:
Sub Test()
LoopThruSheetsBookX ActiveWorkbook
LoopThruSheetsBookX Workbooks("Name.xls")
End Sub
Sub LoopThruSheetsBookX(BookX$)
.....
HTH,
Bernie
MS Excel MVP
wrote in message
...
Hi All,
I got one macro, which I pasted in my module but if I want to run that
macro,
the macro name is not visible. Or how do check the result to be
appeared in immediate window ?
Sub LoopThruSheetsBookX(BookX$)
Dim sh As Sheet
For Each sh In Workbooks(BookX$)
Debug.Print sh.Name
Next sh
End Sub
|