Solved

write #1, <HTML> produces error

Posted on 2000-03-23
7
145 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…

930 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

13 Experts available now in Live!

Get 1:1 Help Now