[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

" does not work (VB6)

I'm trying to use the Shell command to launch an external application.  The command line I need to use has parameters.  I've reviewed many answers in this forum, and most talk about using the " keyword to replace quote marks.  However, when I try to use this approach, I get a Compile Error: Expected expresson.

Example:

    Dim sString As String
    sString = "This is a string "

Is there some setting which allows VB to interpret " as a quote?

Thanks
0
bwaller
Asked:
bwaller
  • 3
  • 2
  • 2
  • +1
1 Solution
 
Erick37Commented:
Chr(34) is the "

sString =Chr(34) & "This is a string" & Chr(34)
0
 
bwallerAuthor Commented:
I'm aware of Chr(34), but I keep seeing references to "
Why doesn't this work for me?
0
 
Arthur_WoodCommented:
where are you seeing references to " ?  becuase that will NEVER work in VB or VBScript.

AW
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Erick37Commented:
&Quot; is used in HTML
0
 
bwallerAuthor Commented:
Arthur,

Do a search for "quote" in the Visual Basic section.  You'll see " in almost every answer.
0
 
vinnyd79Commented:
I could be wrong but I don't think """ was in the original answers. I think the html is showing it where there was supposed to be a "" in the original answer.
0
 
Arthur_WoodCommented:
vinnyd79 is right on...I have NEVER seen notation like " in ANY Visual Basic section answer, and I have been on this site DAILY for almost 2 years.  It has something to do with YOUR browser, or how YOU are accessing the pages, and that notaion is NOT in the original text as posted to the page, by the user entering the response.

AW
0
 
bwallerAuthor Commented:
Vinny, Arthur,

Your answers make sense.  I wonder what the problem is with my browser (IE6).  I guess that's a question for a different forum.  Thanks for your help.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now