I have a function that i send it a int like 3, and the function will pause for 3 seconds then move on..
However... i cant seem to get the pause to work correctly, it just shoots right through the function.

Code:
    'Function To Control Pause / Wait Time Selected
    Private Sub Pause(ByVal seconds As Integer)
        Dim returnTime As Date = Now.AddSeconds(seconds)
        Do While Now < returnTime
            Application.DoEvents()
            Threading.Thread.Sleep(100)
        Loop
    End Sub

   Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        Try
          Pause(3)
          MsgBox("OK")
          Pause(3)
        Catch ex As Exception
           Pause(3)
           MsgBox("Error")
           Pause(3)
        End Try
    End Sub