-
Quotes
This is probably a easily answerable question, but I am still new at this...when you are adding text such as txtGo.text = " hello= " , its recognized as that being the content. But what if i actually need to put quote marks withing the quotations? such as .text = " hello = "hi" " ?
is there a &vbkey I can use or something like that?
Thanx in advance :(
[Edited by Crazy VIII on 09-08-2000 at 03:13 PM]
-
Use Chr$(34).
Code:
Text1.Text = Chr$(34) & "Hello" & Chr$(34)
-
Use double quotes:
Code:
Dim str as String
str = "Hello=""Hi"""
-
for single quotes:
Chr(39)
-
Cant program :(
I seem to be doing something wrong here. This is the result that I want to occur:
<html>
<head>
<title> txtInputA </title>
</head>
<body bgcolor="cboInput1" text="cboInput2" link="cboInput3" alink="cboInput4" vlink="cboInput5">
Here is what I have...
Code:
rtxtHtml.Text = "<html>" & VbCrLf
"<title>" & VbCrLf
rtxtTitle.Text & VbCrLf
"</title>" & VbCrLf
"</head>" & VbCrLf
"<body bgcolor=" & Chr$(34)& cboBg.Container
right
...Im FAR from sure if thats even close to being correct...but the example i put is how I want it to show up. Thanks a million if anyone can help me on this :(
-
The VB compiler/interpreter takes newline characters in your code as end-of-statements, unless you use the underscore character at the end of a line.
You need to either use the underscore ( _ ) or put your statements all on one line each, like this (both cases shown):
Code:
rtxtHtml.Text = "<html>" & VbCrLf & _
"<title>" & VbCrLf & _
rtxtTitle.Text & VbCrLf & _
"</title>" & VbCrLf & _
"</head>" & VbCrLf & _
"<body bgcolor=" & Chr$(34)& cboBg.Container
OR
Code:
rtxtHtml.Text = "<html>" & VbCrLf & "<title>" & VbCrLf & txtTitle.Text & VbCrLf & "</title>" & VbCrLf & "</head>" & VbCrLf & "<body bgcolor=" & Chr$(34)& cboBg.Container
Sorry about that second line of code being so long, it's probably messed up all the text in this thread now. Never mind :)