Compiler error- encountered processing a string expression. End of expression expected

Hi All,

I want to enter a search term into a browser input. To do this I’m trying to create a variable with the following string:

““Head Of” Or “Director” Or “CEO” Or “CFO” Or “COO” Not “Consultant” Not “Business analyst””

However, a compiler error shows:
Validation Error: Compiler error(s) encountered processing expression “”“Head Of” Or “Director” Or “CEO” Or “CFO” Or “COO” Not “Consultant” Not “Business analyst”"".
End of expression expected.

Can someone advise the correct way to do this?

Quotes in VB.Net are escaped by typing them twice. Change your string to:

"""Head Of"" Or ""Director"" Or ""CEO"" Or ""CFO"" Or ""COO"" Not ""Consultant"" Not ""Business analyst"""

2 Likes

Brilliant, thank you very much!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.