|
-
Apr 19th, 2002, 07:57 AM
#1
Thread Starter
Frenzied Member
2 hopefully simple things.
Hi.
Im makin a simple program to write some html code out.
I need to know how to do 2 thing's.
1) how do i write " into the code without having it Error on me ?
at the moment it is
VB Code:
temp = "<body bgcolor=" & textbg &"alink=" & text1 & " vlink=" & text2 & " >"
but i want it to go to the html = of
<body bgcolor="textbg" alink="text1" vlink="text2" >
but i know if i add the " just like
temp = "<body bgcolor="" & textbg ....
it will error
any help?
2)
i want to add new lines into it, via the code. so it look like standart html code.
<html>
<head>
<title> text title </title>
</head>
Please help.
Wayne
-
Apr 19th, 2002, 08:01 AM
#2
Lively Member
use chr(34) for quotes and vbnewline for guess what...
hth
Everytime
"I'm not normally a religious man, but if you're up there, save me, Superman!" Homer Simpson
Visit my site
-
Apr 19th, 2002, 08:01 AM
#3
Re: 2 hopefully simple things.
TRY
1)
Code:
temp = "<body bgcolor=""" & textbg ....
2)
Code:
use vbcrlf constant to break to a new line
-
Apr 19th, 2002, 08:01 AM
#4
Addicted Member
Question # 1:
You can use double quotes or Chr(34) to put a quote in your code
msgbox "He""llo"
the above would print He"llo
or you can do this:
msgbox "He" & chr(34) & "llo"
which would also print He"llo
Question #2:
you can use the vbCrLf to make newlines
msgbox "First Line" & vbcrlf & "Second Line" & "still Second line" & vbcrlf & "Third Line"
Hope this helped
-George
-
Apr 19th, 2002, 08:03 AM
#5
PowerPoster
Well
This is what I do for the header info (Note it includes a variable called budget, and built in varaible Date).
VB Code:
Print #1, "<html>"
Print #1, "<body bgcolor=#FFFFFF>"
Print #1, "<p><b>"
Print #1, "<h1 align=center><font><font face= Tahoma color= YELLOW size=6>Main App.</font></h1>"
Print #1, "<h2 align=center><font><font face= Tahoma color= RED size=4>Project Professional</font></h2>"
Print #1, "<h3 align=center><font><font face= Tahoma color= WHITE size=4>Budget Analysis</font></h3>"
Print #1, "<h3 align=center><font><font face= Tahoma color= WHITE size=4>" & BUDGET & "</font></h3>"
Print #1, "<h3 align=center><font><font face= Tahoma color= WHITE size=2> as of " & Date & "</font></h3>"
Print #1, "<hr><br>"
Remember, the extra quotes ca cause you nightmares...
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|