Loading session...

AI Roundtable Poll · 6 models

#次の条件を満たすタスク VBAで"A"の標準モジュールのマクロを完了後、ほかの標準モジュール"B"と"C"を二つ自動で実行させることは可能か?

Result: Unanimous — Yes (6/6 votes)

Options

Model Responses

GPT-5.4

Vote: Yes

VBAでは可能です。 標準モジュールAのマクロ終了前または終了時に、モジュールBとCにあるPublic Subを順番に呼び出せば、自動実行できます。モジュールが別でも、プロシージャ名を指定して実行可能です。 例えば、Aの中で `Call MacroB`、`Call MacroC` のように書けます。`Application.Run` を使う方法もあります。 つまり「Aの処理完了後にBとCを続けて動かす」という制御は、VBAの通常機能で実現できます。

Grok 4.20

Vote: Yes

In VBA, it is straightforward to chain macro execution across standard modules. At the end of the Sub in module A, simply add calls like 'Call ModuleB.YourMacroB' and 'Call ModuleC.YourMacroC' (assuming public procedures). This ensures B and C run immediately after A's code completes. No special permissions or add-ins are required for standard modules in the same workbook. Application.Run can also be used for more dynamic invocation if needed.

Sonar Pro

Vote: Yes

VBAでは、標準モジュールAのマクロ内で**Application.Run**メソッドや**Call**文を使用して、他の標準モジュールBとCのマクロを明示的に呼び出すことが可能です。これにより、Aのマクロ完了後にBとCを順次自動実行できます。 例えば、モジュールAのSubプロシージャの最後に以下のように記述します: ```vba Sub MacroA() ' Aの処理 ' ... ' BとCの実行 Application.Run "ModuleB.MacroB" Application.Run "ModuleC.MacroC" End Sub ``` 標準モジュール内の公開Subは名前空間付きで呼び出せ、検索結果[1][2]で示されるイベント駆動の自動化と同様に、明示的呼び出しもVBAの基本機能です。 制限事項として、再帰呼び出しや無限ループに注意が必要ですが、条件を満たす自動実行自体は完全に可能です。

Kimi K2.5

Vote: Yes

In VBA, procedures from one standard module can call procedures from other standard modules. After Module A's macro completes, you can simply invoke the public subroutines in Module B and Module C using the Call keyword or direct invocation (e.g., `Call ModuleB.MacroB` or just `MacroB`). Since procedures in standard modules are Public by default, they are accessible from Module A. Alternatively, you can use `Application.Run` to execute them by name. This is standard VBA functionality.

Claude Opus 4

Vote: Yes

Yes, this is absolutely possible in VBA. After a macro in standard module "A" completes, you can automatically call macros in other standard modules "B" and "C" by simply using the `Call` statement or directly referencing the procedure names at the end of module A's macro. For example, at the end of the Sub procedure in module A, you can write: ``` Call ModuleB_Macro Call ModuleC_Macro ``` Alternatively, you can use `Application.Run` to invoke macros by name. As long as the procedures in modules B and C are declared as `Public` (which is the default), they are accessible from any other module within the same VBA project. You can also run them sequentially or even use more advanced techniques if you need parallel-like execution. The fundamental capability of calling procedures across standard modules is a basic feature of VBA, so this task is entirely achievable.

Gemini 3.1 Pro

Vote: Yes

VBAでは、異なる標準モジュール間にあるマクロを呼び出して連続実行することが完全に可能です。 標準モジュール"A"に記述されたマクロの最後の部分に、`Call`ステートメントを使用して標準モジュール"B"と"C"のマクロを指定するだけで実現できます。 具体的には、モジュールAのコードの末尾に `Call B.マクロ名` や `Call C.マクロ名` と記述することで、Aの処理が完了した直後にBとCの処理を自動的かつ順番に実行させることができます。したがって、答えは「Yes」です。

Final Summary

The AI Roundtable reached a swift and unanimous verdict on this VBA technical query, with all six models agreeing that chaining macros across modules is a standard feature of the language. From GPT-5.4 to Gemini 3.1 Pro, the group highlighted that the public nature of standard modules makes this automation trivial. Claude Opus 4 and Sonar Pro led the technical charge, explaining that a simple 'Call' statement or the 'Application.Run' method is all it takes to bridge the gap between modules A, B, and C.

No agreement after 1 rounds of discussion. Final vote: Yes: 6

Strongest Arguments

  • Yes: VBA allows procedures in standard modules to call any other public procedure in the same project using the 'Call' statement or 'Application.Run', making sequential execution across modules B and C a native and straightforward capability.