Solved

" does not work (VB6)

Posted on 2004-10-20
8
278 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

816 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now