YvetteYC
asked on
how to get varPlant get description for plant code
I need to get the description name from varPlant which is set as a variant
varPlant(1,0) as Variant
varPlant = description
This is what I have which is not correct. It may be easy to someone who knows VB but I'm new to this.
varPlant(1,0) as Variant
varPlant = description
This is what I have which is not correct. It may be easy to someone who knows VB but I'm new to this.
ASKER
Okay now I'm getting a variable not defined (it's pointing at the description) I shouldn't have this as a variable if I'm trying to get the plant description. Or am I making this more difficult?
You need to to what jimhorn said then, you need to define the variable description, and put something in it. Alternatively just put a literal straight into the variable.
Something like
...
Dim description As String
...
description = "My description"
...
varPlant(0,0) = description
'or
'varPlant(1,0) = description
OR
varPlant(0,0) = "My description"
or
varPlant(1,0) = "My description"
Something like
...
Dim description As String
...
description = "My description"
...
varPlant(0,0) = description
'or
'varPlant(1,0) = description
OR
varPlant(0,0) = "My description"
or
varPlant(1,0) = "My description"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much cleared up a lot. Thanks
varPlant(0,0) = description
or
varPlant(1,0) = description
Hope this helps.
-Jim