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 Called macro runs twice in excel 2002

Good catch - I can reproduce it in xl2000 as well. I can't say why either.

--
Regards,
Tom Ogilvy

"Andy Pope" wrote in message
...
Hi Tom,

I can generate the problem and solution with two very simple macros, in
the same workbook.

Sub A
MsgBox "Sub A"
End Sub
Sub B
Application.Run "A()"
End Sub

If you remove the open and close brackets all works as expected.
i.e.
Sub B
Application.Run "A"
End Sub

Trouble is I do not know why.

Tom Ogilvy wrote:

what fires the original macro? Is it tied to an event? I would put a
msgbox in the original macro just before the run command and see if the
original macro is running twice as well.


--

Cheers
Andy

http://www.andypope.info