|
-
Jul 9th, 2013, 02:04 PM
#1
Thread Starter
New Member
VB6 - Convert Variant to Node
I am using a For Each loop to go through a Variant array in VB6. At one point, I want to convert the element of the loop (elem), which is a Variant, to a Node.
Code:
Dim elem as Variant
For Each elem In ndArray
Dim nodle As Node
nodle = CType(elem, Node)
Next
That's not the whole loop, but it gives you an idea of what I'm trying to do. When I run this code, I get an error saying "Variable not defined", which points to the 'Node' in the CType method. This is not a variable, it is a type and the method should know that since it is expecting a type.
Anyone know what's going on here? Is this conversion even possible?
Any suggestions would be greatly appreciated.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|