Yes. You are missing a clear explanation of your problem. You stated you
wanted to rename your module for which I gave you the correct answer.
It now appears that what you were originally talking about was what you see
in Tools=>Macro=>Macros where you see
Module1.All
Module2.All
And you wanted to rename your procedure so it didn't have the Module2. this
is unnecessary.
Possibly. When you imported modules into your workbook, they had duplicate
macro names. Excel adds the module designation in Tools=>Macro=>Macros so
you can tell which one you want to run. Selecting it and hitting run should
cause no problem.
In the case of the module you renamed, you should change the module name
back to module2 or something unique. You should not have a Sub named the
same as the module name. If you want to rename your subs/procedures, just
edit their declaration in the module. (but this should not be necessary)
Sub MyMacro()
End sub
would be renamed by changing MyMacro to something else.
Your statement that Module2.All doesn't work is incorrect. As an example,
Module1:
Sub EFG()
MsgBox "In Module1"
End Sub
Module2:
Sub EFG()
MsgBox "In Module2"
End Sub
Sub ABB()
Module2.EFG
Module1.EFG
End Sub
When I run ABB, it first executes the EFG in Module2, then it executes the
EFG in Module1.
However, since ABB is in Module2,
Sub ABB()
EFG
Module1.EFG
End Sub
Works exactly the same since it look at its own module first.
For procedures with duplicate names, if they are external to the module of
the calling procedure, they should include the module name.
--
Regards,
Tom Ogilvy