Hi there,

I can give you two links that may get you started:

Check Process checks if a certain process is running and uses API calls. No references required.

The submission there was based on this post which was looking for a way to kill a specific process.

The relevant part from the second post is:
[vba] Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbAppWindows Then
If CheckProcess("wfica32.exe") Then
MsgBox "Please logout of citrix!"
Cancel = 1
End If
End If
End Sub [/vba]

You'd want to take the info from the KB entry. Copy the above in and change the wfica32.exe to the name of the process you want to kill, and you should be well on your way.

HTH,