What you need to do then is check the value of it first before you increment it. So basically you would declare an Integer at class level (ie outside of an event handler or Sub/Function) and use this to keep track of which stage you are currently at. After you complete each stage you add 1 to the counter so that the next time the DocumentCompleted event is raised your code will know which bit to execute.I tried a counter or Boolean but as long as it falls in the Document Completed event it will be reset each refresh
E.g:
vb Code:
Public Clas Form1 'Declare our counter at class level Private Counter As Integer = 0 Private Sub Document_Completed etc etc If Counter = 0 Then 'Do sign in stuff here 'Add 1 to the Counter Counter += 1 ElseIf Counter = 1 Then 'Do stuff here that you would do after sign in Counter += 1 ElseIf Counter = 2 Then 'Do stuff here you would do the next time the page is reloaded Counter += 1 End If End Sub End Class
Of course you need to make sure you reset the counter to 0 if you start this process again





Reply With Quote