pass Class Module Objects

  • Thread starter Iulian Dan Repolschi
  • Start date
I

Iulian Dan Repolschi

I have an object in c# that oppens msAccess and run a function from a
module. The function has one parameter, a c# object.
In Vba, the c# object is used to create another c# object, and after
that, a function is called on the last created c# object.
The function called has one parameter, a "System.Object".
If the parameter passed is a "String", even a VBA Form, eveything
works just fine, but when trying to pass a Class Module Object, I get
an Automation Error, with no details about it.
Does anybody has any ideea how to solve this problem?

Yours,
Iulian Dan Reposchi
 
A

Alex Ivanov

I don't believe VBA understands dotnet objects. I think there is a COM
compatibility layer in dotnet, but am not sure how to turn it on. You'd
better ask this question in any of dotnet groups.
 
I

Iulian Dan Repolschi

It seems it does. At least I was able to invoke some functions o the
dotnet object passed. Only when passing the vba class module object as
a parameter to a function of the dotnet object, the automation error
appeared. I have even succeeded to pass a access form object and it
worked.
I will certainly try to post it on some other newsgroups too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top