I need to know when my shelled application has finished (creating a .zip file) and tried using the code posted on VB-World, but keep getting this error:

User-defined types and fixed-length strings not allowed as the type of a Public member of an object module; Private object modules not allowed as the type of a public member of a public object modules

for this code:

Declare Function CreateProcessA Lib "kernel32" _
(ByVal lpApplicationName As Long, ByVal lpCommandLine As _
String, ByVal lpProcessAttributes As Long, ByVal _
lpThreadAttributes As Long, ByVal bInheritHandles As Long, _
ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, _
ByVal lpCurrentDirectory As Long, lpStartupInfo As _
STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) _
As Long

Anybody know why I am getting this error? The code is located in the (general) (declarations) section of my form. Also, is this really the simplest way to know when the app has finished?

Thanks,

Shawn