Having trouble with syntax.

NJudson

Who farted?
Local time
Today, 14:22
Joined
Feb 14, 2002
Messages
297
I am writing code to output data to a file but am having trouble with the syntax. Here is a sample of the code that I'm having trouble with:

Close #1
Open "C:\PROWIN3\ASPECT\TestDeleteRadioScript.WAS" For Output As #1

Print #1, "Transmit " & "strString"
....etc

When I open the file it reads

Transmit strString

but what I want it to read is

Transmit "strString"

I can't get it to output the quotations the around the strString.
I'm sure there's probably a very simple solution but I can't seem to figure out the quotations syntax and I'm having trouble finding the answer on the net. Thanks for any advice on this stupidly perplexing dilemna.
 
Make a constant to hold the double quote and put it into a new module:

Public const QUOTE As String = """"

.....
Print #1, "Transmit " & QUOTE & strString & QUOTE
 

Users who are viewing this thread

Back
Top Bottom