Solved

" does not work (VB6)

Posted on 2004-10-20
8
279 Views
Last Modified: 2010-05-02
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
Comment
Question by:bwaller
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 12362223
Chr(34) is the "

sString =Chr(34) & "This is a string" & Chr(34)
0
 

Author Comment

by:bwaller
ID: 12362385
I'm aware of Chr(34), but I keep seeing references to "
Why doesn't this work for me?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 12362491
where are you seeing references to " ?  becuase that will NEVER work in VB or VBScript.

AW
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 32

Expert Comment

by:Erick37
ID: 12362589
&Quot; is used in HTML
0
 

Author Comment

by:bwaller
ID: 12362591
Arthur,

Do a search for "quote" in the Visual Basic section.  You'll see " in almost every answer.
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 50 total points
ID: 12364759
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
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 12366268
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
 

Author Comment

by:bwaller
ID: 12366331
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 64
VBA: Select SQL query based on a config Sheet v2 11 49
Help me. 3 60
VBA to find and replace multiline text from VBA modules 8 64
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question