Public Function SafeShell (
PathName As String,
Optional WindowStyle As VbAppWinStyle = vbMinimizedFocus,
Optional ThrowError As Boolean = False
) As Integer
wraps the VBA 'Shell' function, suppressing any error message.
See Shell function for use.
The WindowStyle of the new command window
Throw an error if one occurs
Dim i As Integer
i = xf.Interact.SafeShell(PathName)
i = xf.Interact.SafeShell(PathName, WindowStyle, ThrowError)
SafeShell "C:\Program Files\SysInternals\du.exe"