Solved

write #1, <HTML> produces error

Posted on 2000-03-23
7
144 Views
Last Modified: 2010-05-02
This should be pretty easy, but I just can't seem to figure it out!

I am writing to a file, and the content is HTML.  However, when I try to write an HTML tag, I get an error unless I put it in quotes.  The problem?  The quotes get written to the file as well.

Here is an example

write #1, <HTML>

this produces an error (waiting for expression).  So I do this

write #1, "<HTML>"

this eliminates the error, but the quotes also get written to the file.

I tried using the \ escape character, but that didn't work either.  Any ideas?

Thanks
0
Comment
Question by:kprestage
7 Comments
 
LVL 14

Accepted Solution

by:
mcrider earned 25 total points
ID: 2649208
Try this instead:

print #1, "<HTML>"


Cheers!®©
0
 
LVL 3

Expert Comment

by:Gordonp
ID: 2649211
USing Write, places delimeters, around your entries to specify it as text.

Use Put rather than write, to avoid the quotations

ie  

Put #1, "<HTML>"

your file would read

<HTML>

Gordon


0
 
LVL 7

Expert Comment

by:Vbmaster
ID: 2649215
Instead of the Write statement you should use Print...

   Print #1, "<HTML>"
   (this one will write <HTML> to the file and add new line character)

or

   Print #1, "<HTML>";
   (this one will write <HTML> to the file, next Print statement will continue
   directly after the text)

More info can be found in your helpfile.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 3

Expert Comment

by:Gordonp
ID: 2649216
actually that should be

Put #1,,"<HTML>

0
 
LVL 3

Expert Comment

by:Gordonp
ID: 2649231
Gordonp changed the proposed answer to a comment
0
 
LVL 9

Author Comment

by:kprestage
ID: 2649255
Thanks for everyone's input, they all worked, so I just had to pick the first one.  I Appreciate the help!
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2649288
Thanks for the points! Glad I could help!


Cheers!®©
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

705 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

16 Experts available now in Live!

Get 1:1 Help Now