|
-
Jan 11th, 2000, 04:41 AM
#1
Thread Starter
New Member
Well i've been prolonging this question and doing it the hard way long enuff. How do i put a ( " ) within a textbox in code here's what i mean
Text1.text = "to qoute the philosopher, he said "I am COW!" "
see right now VB wants to count the two quotation marks around what the philosopher said but i want that to be a part of the sentence and not a break in the string. Get it? it's kinda hard to explain it further so i hope people can understand.
THANX!
------------------
MooCow
-
Jan 11th, 2000, 04:46 AM
#2
Lively Member
You could write:
Text1.text = "to qoute the philosopher, he said ""I am COW!"""
Jay D Zimmerman
-
Jan 11th, 2000, 04:59 AM
#3
Frenzied Member
You might also try:
Text1.text = "to quote the philosopher, he said " & chr$(34) & "I am COW! " & chr$(34)
-
Jan 11th, 2000, 05:12 AM
#4
Thread Starter
New Member
thanx for the tip with the chr$(34)
helps me a lot now 
------------------
MooCow
-
Jan 11th, 2000, 09:27 PM
#5
Yopu could also assign it to a variable which allows easy use throughout the program:
strQuote = ChrW(34)
.........
strOut = strQuote & "To be or not to be....." & strQuote
------------------
Boothman
There is a war out there and it is about who controls the information, it's all about the information.
-
Jan 11th, 2000, 10:29 PM
#6
Frenzied Member
Yeah!
i always use a Const
mainly for including variables in SQL strings
Code:
Const Quote = """"
Text1.Text = "to qoute the philosopher, he said " & Quote & " I am COW!" & Quote
-
Jan 11th, 2000, 11:55 PM
#7
Addicted Member
If you are trying to run code and need to define a variable within a string you can do this:
Dim sStr as string
Dim sStr2 as string
sStr2 = "HI THERE"
sStr = "I Would Like to Say '" & sStr2 & "'"
Notice I have a single "Tick" right before the end quote and right after the sStr2.
I dont know if this is what your looking for but good luck.
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
|