?
Solved

write #1, <HTML> produces error

Posted on 2000-03-23
7
Medium Priority
?
155 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 100 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Suggested Courses
Course of the Month17 days, 7 hours left to enroll

864 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