I am running a external command "PKZIP" to zip some files that is dumped at some perticuar location. PKZIP is fired from a Times event using "Shell" command.
Following is the method called from Timer event
Public Sub AddFile(sZipFileName As String, sFileName As String)
Dim iVal as long
iVal = Shell("pkzip " & sZipFileName & " " & sFileName, vbHide)
Dim i As Long, j As Long
For i = 0 To 100000
j = i
What I have found that, if do not use loop of i=- to 100000 then the zip is not created ot updated. But I do not want to use the loop to adjust the time to allow PKZIP to complete it's task.
I want the Timer to wait till the PKZIP finishes it's task.
In other words, How can I come to know the task of PKZIP or any other external command is completed and with success/fail status.
One more thing, Even though the loop is there, some files are also missed from zipping. THis happens even when I have just VB only opened after restarting.
I seen help of ShellExecute, but i do not think it will solve the purpose.
but sure u guys will help me.