ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

Book1©I¥lBook2ªº¥¨¶°¤§«á¡ABook1¥¨¶°¤£¯àÄ~Äò

Book1©I¥lBook2ªº¥¨¶°¤§«á¡ABook1¥¨¶°¤£¯àÄ~Äò

¦pÃD¡A½Ð«ü±Ð¡IÁÂÁ¡I
¨S¥[¤J¥H¤UÂŦâµ{¦¡½X«e
Output(¥¿±`):
AAA
BBB
CCC

¦ý¥[¤J¥H¤UÂŦâµ{¦¡½X«á
Output:
AAA
BBB


[D:\temp\Test\Book1.xlsm]
Sub Macro1()
MsgBox ("AAA")
Application.Run "'D:\temp\Test\Book2.xlsm'!Macro1"
MsgBox ("CCC")
End Sub

[D:\temp\Test\Book2.xlsm]
Sub Macro1()
MsgBox ("BBB")
ThisWorkbook.Close False '¥[¤J³o«ü¥O«á¡A¤£¯àÄ~Äò Book1.xlsm!Macro1 ¾l¤Uµ{§Ç(¬õ¦r³¡¥÷)
End Sub

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD