[Last Call] Learn how to a build a cloud-first strategyRegister Now


handle C# events in vb6 (VBA)

Posted on 2004-11-04
Medium Priority
Last Modified: 2008-01-09
I have created component (.net dll), and I want to use in Access. Everything works fine, but I have problems handling events from that component.

I need an example where vb responds to events from .net assembly
Question by:mykapa
  • 2
LVL 48

Accepted Solution

Mikal613 earned 2000 total points
ID: 12493410

Author Comment

ID: 12495458
Thanks, for reply. I changed .net component and vb code according to the article in MSDN.

Now I have another problem :

Public WithEvents rptObject As MyReport

Private Sub Class_Initialize()
  Dim o As Object
  Set o = New MyReport
  Set rptObject = o            <--- error - Method 'rptObject' of object 'clsAccess2XLSReport'
End Sub

Then I tried to use this in form module, the same way, I got an error: Automation error. The system cannot find the file specified.

P.S. When I delete the keyword WithEvents, everything works fine, but ... without events :(

Author Comment

ID: 12828356
The problem was that I had to put my component dll in Access directory, then everything works. Thanks

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question