View Single Post
  #3  
Old 06-03-2011, 02:14 PM
CREvans CREvans is online now
Registered User
 
Join Date: 03-10-2008
Location: Iowa
Posts: 28
I can see the point in that, but it makes dealing with different scenarios a bit more difficult, in case someone checks the "wait until completion" box, the dependency on that macro being there will fail. For anyone else who might come across this sort of error in the future and is searching the Forums for a resolution, here is what I ended up doing, to handle whether the RUNPROGRAM_PROCESSID exists or not. It is assumed that there won't be a process numbered 999999 out there, which is why I chose that number to default to.


Sub vbld_StepDone()

' store this step's process ID in another temporary macro
if vbld_AllMacros()("RUNPROGRAM_PROCESSID") is nothing then
vbld_TempMacros().Add "Child_ID", "999999"
else
vbld_TempMacros().Add "Child_ID", vbld_TempMacro("RUNPROGRAM_PROCESSID").Value
end if

End Sub
Reply With Quote