user141519
user141519

Reputation: 9

Is it possible to create an instance of a class in VB from a string containing the class's definition?

Is it possible to create an instance of a class in VB 5 CCE from a string containing the class's definition?

Um... I'm actually using VB 5 CCE because I'm too cheap to get a version that costs money. Can someone tell me how to implement it that way?

TYVM to whoever answers this!!!!!

NVM... I'm downloading VS 2008 Express...

Upvotes: 0

Views: 209

Answers (2)

Jimmy Chandra
Jimmy Chandra

Reputation: 6580

If you mean something like given a string with the following value: "Public Class Foo:Public Sub Bar():End Sub:End Class" and you want something like Dim the class = Eval(theString) and do something with your new class, see this.

They do it by extending it in VBScript.

Upvotes: 1

Chris McCall
Chris McCall

Reputation: 10407

Dim obj As Object
Set obj = CreateObject("ClassName")

Upvotes: 1

Related Questions