Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • 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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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