I have created a little app which sits at the bottom of the users screen and scrolls a series of little labels across the screen. The labels' tag property contains a URL and when one of the labels is clicked it opens an instance of Internet Explorer at the relevant URL.
This works fine the first time I do it, but the second time I get the following error:
"Method 'web' of object 'Form1' failed"
The code for the click event is as follows:
Private Sub lblLinks_Click(Index As Integer)
Set web = New SHDocVw.InternetExplorer
web.Visible = True
web.Navigate lblLinks(Index).Tag
End Sub
The following line also appears in the declarations section:
Public WithEvents web As SHDocVw.InternetExplorer
Can anyone help?
This works fine the first time I do it, but the second time I get the following error:
"Method 'web' of object 'Form1' failed"
The code for the click event is as follows:
Private Sub lblLinks_Click(Index As Integer)
Set web = New SHDocVw.InternetExplorer
web.Visible = True
web.Navigate lblLinks(Index).Tag
End Sub
The following line also appears in the declarations section:
Public WithEvents web As SHDocVw.InternetExplorer
Can anyone help?