|
I currently have an array populated with string values and am trying to compare the values in the array to other string values, but I am getting an error. The error message is “Conversion from string "SDrug" to type 'Boolean' is not valid”. Here is the code I have written.
“If IndustrySectorContentArray(IndustrySectorCounter) = "SFinancials" Or "SDrug" Then “.
If I just compare the content in the array to "SFinancials" then I don’t have an issue, but when I add the “Or” command I am getting the error.
Can someone point me in the right direction to get the desired result?
Thanks.
George
|
|
|
|
|
you need to include the whole statement in each side of the comparison like this:
If IndustrySectorContentArray(IndustrySectorCounter) = "SFinancials" Or IndustrySectorContentArray(IndustrySectorCounter) = "SDrug" Then
End If
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
That Solved it. Thanks a lot for your help.
George
|
|
|
|
|
Glad to help
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|