Sorry for not being more clear on the subject. I've since went away from the batch files and decided to create the same tasks within VBA itself as to the functions that were happening in the batch files. The functions were simple, copy and pasting of files from different locations and folders.
What I did was created a Sub that now does this. It works great when copying only single files, but what if I want to copy multiple files? I'd define them in a string varialbe, but I don't know how to change my existing code to allow for muliple files:
Sub Copy_File(fileNameDefinition, fileFromFolderDefinition, fileToFolderDefinition)
'This example copy all Excel files from FromPath to ToPath.
'Note: If the files in ToPath already exist it will overwrite
'existing files in this folder
Dim FSO As Object
Dim FromPath As String
Dim ToPath As String
Dim File As String
FromPath = fileFromFolderDefinition '<< Path Defined in files definition module
ToPath = fileToFolderDefinition '<< Path Defined in files definition module
File = FromPath & fileNameDefinition '<< Name Defined in files definition module
'You can use *.* for all files or *.doc for word files
If Right(FromPath, 1) <> "\" Then
FromPath = FromPath & "\"
End If
Set FSO = CreateObject("scripting.filesystemobject")
If FSO.FileExists(File) = False Then
MsgBox File & " is missing please confirm name and location."
Exit Sub
End If
If FSO.FolderExists(FromPath) = False Then
MsgBox FromPath & " is missing, please confirm the network path is correct."
Exit Sub
End If
If FSO.FolderExists(ToPath) = False Then
MsgBox ToPath & " is missing, please confirm the local folder is correct."
Exit Sub
End If
FSO.CopyFile Source:=File, Destination:=ToPath
MsgBox "Successful Completion." & vbCrLf & vbCrLf & "Source files were copied from: " & vbCrLf & vbCrLf & File _
& vbCrLf & vbCrLf & " to: " & vbCrLf & vbCrLf & ToPath
End Sub