Hi Les,
this is the part of code I use for the SHELL.
On Error Resume Next
var_process_number = Shell("wzzip.exe -exm .....,
vbMinimizedNoFocus)
If Err Then
If Err.Number = 53 Then
MsgBox "Stopped
Else
MsgBox "Export Stopped." & "Problem : " & Err.Description,
vbExclamation, "Export"
End If
Err.clear
End If
On Error GoTo error_handler:
If var_process_number = 0 Then
MsgBox "Export Stopped
Else 'wait until compressing is over
var_process_handle = OpenProcess(&H100000, True,
var_process_number)
WaitForSingleObject var_process_handle, -1
CloseHandle var_process_handle
------------------------------------------------------
Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As
Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As
Long, ByVal dwMilliseconds As Long) As Long
Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As
Long
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!