閉じる

バッチファイルを実行する。 ( Shell 関数 ) Paint起動


Shell([実行プログラムのパス名],[ウインドウの形式])



'Shel関数でPaintを起動する。

       Dim vret As Variant

       vret = Shell("C:\WINDOWS\system32\mspaint.exe", vbNormalFocus)





'Shell関数で、Paintを、画像のパス名をつけて開く

    

        If IsNull(Me.imagePASS) = True Then

            MsgBox "imageパス名が未入力です。起動できません。"

            GoTo Exit_cmdPaintEXE

        End If

        If Len(Me.imagePASS) = 0 Then

            MsgBox "imageパス名が未入力です。起動できません。"

            GoTo Exit_cmdPaintEXE

        End If

        

        Dim vret As Variant

        vret = Shell("C:\WINDOWS\system32\mspaint.exe """ & Me.imagePASS & "", vbNormalFocus)