'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 指定プログラム実行
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Public Function F_Shell_OpenFile( _
ByVal aFilePath As String, _
ByVal aExePath As String, _
Optional ByVal aExeArg As String = "", _
Optional ByVal aWindowStyle As VbAppWinStyle = vbNormalFocus) As Boolean
Dim wkRet As Boolean: wkRet = False
Dim wkCmd As String
'引数チェック
If Dir(aFilePath) = "" Or Dir(aExePath) = "" Then
Exit Function
End If
wkCmd = aExePath
wkCmd = M_String.F_String_ReturnAdd(wkCmd, aExeArg, aDlmt:=" ")
wkCmd = M_String.F_String_ReturnAdd(wkCmd, aFilePath, aDlmt:=" ")
Shell wkCmd, aWindowStyle
F_Shell_OpenFile = True
End Function
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme