Variant in VB6 to a VB.NET

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

I have an COM object used in my VB.NET project. There's one function return
the result in Variant type so I have to convert it to object type.

Dim myValue as object

myValue = MyCOMobjectFunction

If I want to get value out of the myValue, I have to do this: myResult =
MyValue(0)

How can I convert it to dataset or something in VB.NET type?

Please help. Thanks
 
Hi John,

You may try CType or DirectCast.
Or if the Option Strict is set to Off , then i think you can just use =

Thank You,
rawCoder
 
Back
Top