Microsoft Shell Controls And Automation

Windowsのシェルオブジェクトを使用する際に設定します。
「ツール」-「参照設定」-「Microsoft Shell Controls And Automation」にチェックを入れて、OKします。

【参照設定を使用する場合】

    Dim objShell As Shell
    Set objShell = New Shell    ' Shell オブジェクトの作成

【参照設定を使用しない場合】

    Dim objShell As Object
    Set objShell = CreateObject("Shell.Application")    ' Shell オブジェクトの作成

コメント