Solved

write #1, <HTML> produces error

Posted on 2000-03-23
7
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

688 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