Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
    If Progress = -1 Then ProgressBar1.Value = 100 'the name of the progress bar is "ProgressBar1".
        Label1.Caption = "Done"
        ProgressBar1.Visible = False 'This makes the progress bar disappear after the page is loaded.
        Image1.Visible = True
    If Progress > 0 And ProgressMax > 0 Then
        ProgressBar1.Visible = True
        Image1.Visible = False
        ProgressBar1.Value = Progress * 100 / ProgressMax
        Label1.Caption = Int(Progress * 100 / ProgressMax) & "%"
    End If
    Exit Sub
End Sub 