---------------------------------------------------------------------------
Function ShellDOS_Exit () As Integer
On Error GoTo ShellDOS_Exit_Err
Dim MyCommand As String
Dim TaskId As Integer
'コマンドを MyCommand 引き数に格納します。
MyCommand = " COMMAND.COM /C COPY C :¥ DB1.MDB D :¥ DB2.MDB "
TaskId = Shell (MyCommand, 6)
ShellDOS_Exit = True
ShellDOS_Exit_End:
Exit Function
ShellDOS_Exit_Err:
MsgBox Error$
ShellDOS_Exit = False
GoTo ShellDOS_Exit_End
End Function
---------------------------------------------------------------------------