Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27254

Classes inside of Modules

$
0
0
Hello,

a colleague of mine wrote a program that was working fine on its own. It was a module containing a class. something like this
Code:

Module m1

DoThisAndThat()

Class c1
//variables and constructor
End Class

DoMoreStuff()
End module

As I said, it is working fine for him, although I really don't think it is a good idea (am I right about this?). Now we want to import that program as an DLL for VB6. Whatever we try though, we can't access the class via VB6. He wants to call the constructor of c1 and fill it with some values, but VB6 doesn't recognize c1 at all. We've tried

Code:

Dim x as m1
m1.c1

Dim x as new c1

Dim x as m1.c1

etc

I really don't know how to deal with this situation. I learned programming mainly via c++. Please help.

Viewing all articles
Browse latest Browse all 27254

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>