How do I use a comma in a string?

AFGPHXExcel
AFGPHXExcel used Ask the Experts™
on
I want to set my string variable, v_WksNamesStr, equal to the value of "Requirements", The code looks like this:

v_WksNamesStr = ""RequirementSummary","

Its looking for more after the comma.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010

Commented:
Try:

v_WksNamesStr = "RequirementSummary"

Open in new window

Top Expert 2010

Commented:
It looks like you had too many doublequotes and a superfluous comma

Commented:
Not sure if the comma is part of the string but if it is, then you have to do like this:

v_WksNamesStr = "RequirementSummary,"
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Are you looking for

v_WksNamesStr = """RequirementSummary"","
try this:

v_WksNamesStr = """RequirementSummary"","

This is because to encode a (") inside a string on Visual Basic, you should duplicate it.

Hope it helps.
Hi, did you notice that that was exactly what I proposed?

Saqib
Thanks ModCorlEEone

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial