Hi
I have the following code (cut down version)
Case TotalCorrect = 22
If txtSliderMood.Text = "Good" Then
Agent.MoveTo x:=300, y:=250
Agent.Speak "This program will now close."
Agent.MoveTo x:=0, y:=0
Call Program
End If
End Select
The Call Program line goes Calls a part in the code that has Unload me, in order to unload the form.
However when run the application does not go through the stages/code line by line as above the agent doesn't move of say This program will now close etc the Call Program part seems to execute before the code above it has executed. The form just closes. I ideally want the code above to execute first and then the form unloads or application closes.
I have the following code (cut down version)
Case TotalCorrect = 22
If txtSliderMood.Text = "Good" Then
Agent.MoveTo x:=300, y:=250
Agent.Speak "This program will now close."
Agent.MoveTo x:=0, y:=0
Call Program
End If
End Select
The Call Program line goes Calls a part in the code that has Unload me, in order to unload the form.
However when run the application does not go through the stages/code line by line as above the agent doesn't move of say This program will now close etc the Call Program part seems to execute before the code above it has executed. The form just closes. I ideally want the code above to execute first and then the form unloads or application closes.