[RESOLVED] Trouble with VB6: What is the issue here?
Hey everyone. I'm using Visual Basic 6, and trying to use a library for a specific control application. The function that I'm attempting to access has this syntax:
Code:
Syntax: cpObject.SetElement index, elementValue
and the code I'm using is
Code:
cp.SetElement(1, txtValue.Text)
The error I'm receiving is "Expected: =" on that line.
I was under the impression that this SetElement function is not a value-returning function, since all it is doing is setting the element of an array. What is the issue here? Let me know if you need more information, and thanks.
Re: Trouble with VB6: What is the issue here?
VB is expecting
Code:
Something = cp.SetElement(1, txtValue.Text)
I think what you are wanting to do is have no returned value, therefore use
Code:
cp.SetElement 1, txtValue.Text
Notice the lack of parenthesis.
Re: Trouble with VB6: What is the issue here?
How disgustingly simple and annoying. Thanks for the help!! I'll probably be back around over the next few days, I hardly ever work with VB, I'm more of a C++ person =\
Thanks again.
Re: Trouble with VB6: What is the issue here?
Don't forget to mark this thread "Resolved". (Click the Thread Tools button above your first post)
Re: [RESOLVED] Trouble with VB6: What is the issue here?