View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default macro name same as module name = problem

I created a couple macros and they work fine.
I then had the bright idea to rename the modules from module1 module2 to
something useful which happened to be the same as the macro name.
So when I looked at the macro in the list instead of the normal list of
macros I was used to, i.e.

DoSomething
DoSomethingelse
DoYetSomethingElse

The ones I renamed were shown like they were in a different workbook, i.e.

worksheet.xls!DoSomething.DoSomething
worksheet.xls!DoSomethingelse.DoSomethingelse
worksheet.xls!DoYetSomethingElse.DoYetSomethingEls e

This caused a third party reporting tool to die a horrible death when it
tried to call them.
Prefixing all the names with "mod" solved the problem.

Can anyone explain why this renameing happens? Is it a VBA "feature" or just
somethign I should have known about?