Macros: Why 'wbook.xls'!MyMacro

A

AA2e72E

I have never seen this before:

In my workbook wbook.xls (Excel XP) I have several macros. On Tools | Macro
| Macros, a dialogue comes up showing the available macros. One of the macros
MyMacro is listed as 'wbook.xls'!MyMacro and selecting it does NOT enable the
Run button. The Run button does get enabled with the other macros - all of
them are in the Worksheet and are listed as ThisWorkbook.MyMacro(n).

However, after Alt + F11, I can step through MyMacro.

There is no open dialogue or error message, no formulaes in the workbook,
and there is no cell editing in progress.

I am completely baffled by this: can someone explain what is happening?

Thanks.
 
J

Joel

The top level main macro (SUB) cannot have any parameters. the main macro can
call other macros (subs or functionions) with parameters.
 
K

keiji kounoike

I maybe misread but I think Poster's ThisWorkbook.MyMacro(n) means
ThisWorkbook.MyMacro1, ThisWorkbook.MyMacro2 and the like. So, I guess
there is no Subs with arguments and he could run the macros like
ThisWorkbook.MyMacro1 except for the macro 'wbook.xls'!MyMacro.

Keiji
 
A

AA2e72E

Any (public) sub that take one or more parameters are automatically excluded
from the dialogue box that follows Tools | Macro | Macros.

My problem is that a macro appears in the dialogue box (in a peculiar way)
and it cannot be run. I need to understand why.
 
A

AA2e72E

Your understanding is spot on.

None of the macros take arguments; still can't understand why the
'wbook.xls'!MyMacro appears the way it does & how this issue can be resolved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top