[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

Event Parms

I have this function that handles an event.  Syntax-wise,  How do I access the 2 parms that are defined for this event:

Public Function aaaa() Handles IE.NavigateComplete2

End Function

http://msdn.microsoft.com/en-us/library/aa768334%28v=vs.85%29
0
HLRosenberger
Asked:
HLRosenberger
  • 3
  • 3
1 Solution
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Add them in?...

    Public Function aaaa(ByVal pDisp As Object, ByRefURL As Variant) Handles IE.NavigateComplete2

    End Function
0
 
HLRosenbergerAuthor Commented:
I tried that, but then I get another error message. See attached.  I missing something, or doing something wrong.
event.png
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
What kind of project are you working in?...and how did you create the IE object?

I added a reference to shdocvw.dll in my system32 folder and this code worked fine:
Public Class Form1

    Private WithEvents IE As SHDocVw.InternetExplorer

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        IE = New SHDocVw.InternetExplorer
        IE.Visible = True
        IE.Navigate2("www.google.com")
    End Sub

    Private Sub IE_NavigateComplete2(pDisp As Object, ByRef URL As Object) Handles IE.NavigateComplete2
        Debug.Print("NavigateComplete2()")
    End Sub

End Class

Open in new window

0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
HLRosenbergerAuthor Commented:
It's a Windows app.    

Public WithEvents IE As New SHDocVw.InternetExplorer
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
My simple test worked fine with no errors and correctly trapped the event.  I would try creating a NEW blank project just to see if something in your current project is "corrupt".

?
0
 
HLRosenbergerAuthor Commented:
Thanks
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now