Click here to Skip to main content
12,633,856 members (24,059 online)

Visual Basic

 
QuestionHelp with Error Message Pin
GeorgieMPorgie5-Nov-12 4:32
memberGeorgieMPorgie5-Nov-12 4:32 
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

AnswerRe: Help with Error Message Pin
Wayne Gaylard5-Nov-12 5:05
mentorWayne Gaylard5-Nov-12 5:05 
GeneralRe: Help with Error Message Pin
GeorgieMPorgie5-Nov-12 6:03
memberGeorgieMPorgie5-Nov-12 6:03 
GeneralRe: Help with Error Message Pin
Wayne Gaylard5-Nov-12 19:31
mentorWayne Gaylard5-Nov-12 19:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 9 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid