smakadia
July 10th, 2001, 09:02 AM
Hi. I am a VC++ developer. This is the first time I'm using VB. I have a COM component which is not a control, that fires an event. In VB I want to catch this event so I created an object using WithEvents. I then do a new on the object but it's here that it complains when I run the app.
The code follows:
option Explicit
private withevents mEvent as MsgGrabber
private Sub Form_Load()
set mEvent = new MsgGrabber
End Sub
private Sub mEvent_MessageRetreived(byval bstr as string)
MsgBox "This is the string: " + bstr
End Sub
private Sub Send_Click()
mEvent.SendMessage ("Client string")
End Sub
MsgGrabber is my COM interface's implementation. The compiler complains on the Set statement. The error I get is:
Automation Error
The specified module could not be found.
Any help would be appreciated.
The code follows:
option Explicit
private withevents mEvent as MsgGrabber
private Sub Form_Load()
set mEvent = new MsgGrabber
End Sub
private Sub mEvent_MessageRetreived(byval bstr as string)
MsgBox "This is the string: " + bstr
End Sub
private Sub Send_Click()
mEvent.SendMessage ("Client string")
End Sub
MsgGrabber is my COM interface's implementation. The compiler complains on the Set statement. The error I get is:
Automation Error
The specified module could not be found.
Any help would be appreciated.