Hi Guys,
I don't know if this will be of use to you, but once I've run the batch file I want it to close automatically, so I've added the following code to my switchboard:
In the top section (declare statments?) Ive added the following
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Then in the open property of the form I've added
Dim CloseIt As Long
CloseIt = FindWindow(vbNullString, "Name of Batch file.Bat"

PostMessage CloseIt, WM_CLOSE, CLng(0), CLng(0)
The batch file now closes as soon as the switchboard opens.
I got this from Thread222-121216
Hope this helps
Private Const WM_CLOSE = &H10 Rob! [Bigcheeks]
Process and Procedure are the last hiding place of people without the wit
and wisdom to do their job properly.