Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Problem with FileDownload Event and Cancel=True

Hello,

i have a big problem with the Cancel=True function in the FileDownload Event from the WebBrowser Control.

Everytime it runs, i get the error 91, object variable or block variable not definied.

My code:

Private Sub WebBrowser1_FileDownload(ByRef Cancel As Boolean)
If DownloadReady = "1" Then
Cancel = True
Else
End If
End Sub

Whats there wrong?
[416 byte] By [patrick_schnell] at [2007-11-11 8:48:04]
# 1 Re: Problem with FileDownload Event and Cancel=True
Is this variable DownloadReady correct defined?
Benjamin at 2007-11-11 17:25:00 >
# 2 Re: Problem with FileDownload Event and Cancel=True
Yes it is.

Ive made a new project, only with a WebBrowser Control and this event. It doesnt worked too, i get this message everytime, when this event startet. And when i delete cancel=true then i get no message.

And with WebBrowser1.Stop i cannot hide or terminate this download dialog too.
patrick_schnell at 2007-11-11 17:26:00 >
# 3 Re: Problem with FileDownload Event and Cancel=True
Hello again,

ive tested now the application in debug modus from vb6. In the debug modus works it, what must be the error, when i compile the program?!?
patrick_schnell at 2007-11-11 17:27:07 >