View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Calling the wrong macro

I guess it depends on what you mean by Call MyMacro1. If you are doing it
with a menu button, then it is tied to a specifice macro - probably the one
in workbook B.

--
Regards,
Tom Ogilvy

"Philip" wrote in message
news:A6Sed.19054$Pl.17748@pd7tw1no...
Hi Folks,
Any help with this would be much appreciated:
I have two workbooks created in Excel 2000, Book A and Book B
Both work books contain a macro which have the same name: MyMacro1

MyMacro1 contains different code in each workbook
When I call MyMacro1 in Book A, Excel opens Workbook B and runs the code
within the Book B - MyMacro1

I can't figure out why this happening - has anyone any ideas please?
I've tried deleting both macros and recreating them independently - to no
avail!

TIA

Philip