Excel VBAから他のExcelインスタンスを捕捉する。 Option Explicit Function GetOtherApplications() Dim Path As String Dim Applications As Variant Dim Application2 As Object Dim Count1 As Long Dim Count2 As Long Dim channelNumber As Long Dim x As Variant Applications = Array() Count1 = GetObject("winmgmts:root\CIMV2").ExecQuery("SELECT * FROM Win32_Process WHERE Name='EXCEL.EXE'").Count Do Application.DisplayAlerts =
![Excel VBAから他のExcelインスタンスを捕捉する。 - Windows Script Programming](https://cdn-ak-scissors.b.st-hatena.com/image/square/03b096f6c04dfa322532982e16dc3d5978abb730/height=288;version=1;width=512/http%3A%2F%2Fscripting.cocolog-nifty.com%2F.shared-cocolog%2Fnifty_managed%2Fimages%2Fweb%2Fogp%2Fdefault.png)