Click to See Complete Forum and Search --> : Progress bar status
Cahlel
Aug 7th, 2000, 10:03 AM
ok, I want an internet status bar and this is my code:
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
ProgressBar1.Max = ProgressMax
ProgressBar1.Value = Progress
End Sub
now, when I run it, when the bar get's to the end, it give me an error that says:
run-time error 380
invalid proptery value
What am I doing wrong?
QWERTY
Aug 7th, 2000, 11:34 AM
Maybe at some point Progress gets bigger than ProgressMax. It would create that error.
Try This:
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
If ProgressMax > Progress Then
ProgressBar1.Max = ProgressMax
ProgressBar1.Value = Progress
End if
End Sub
Post #508
You could also just ignore any error that occurs.
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
Progressbar1.Min = 0
Progressbar1.Max = ProgressMax
Progressbar1.Value = Progress
End Sub
While we're on the topic of Webbrowser, I have IE 5.5, and I noticed that there are more options for the Webbrowser Control. Just a suggestion, try downloading it, you may like it. The bad thing is, well..I'm not sure if it'll still work or not but if the person has IE 5.0 or 4.0, I don't know if the options from the 5.5 IE will work when the person uses your webbrowser.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.