| View previous topic :: View next topic |
| Author |
Message |
sunil21 Newbie
Joined: 23 Dec 2003 Posts: 8
|
Posted: Dec 23rd, 2003 09:37 PM Post subject: textbox |
|
|
how can i show "" inside a text box
text1.text="sss" shows sss in the textbox .i want to see "sss" in
the textbox |
|
| Back to top |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Dec 23rd, 2003 11:00 PM Post subject: |
|
|
Text1.Text = ""sss""
Use 2 quotes right next to each other _________________ If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too. |
|
| Back to top |
|
Algar Newbie
Joined: 16 Oct 2003 Posts: 20
|
Posted: Dec 24th, 2003 12:28 AM Post subject: |
|
|
Actually Andir, I may be wrong but,
Text1.Text = """sss"""
That one MAY be correct, and yours may test it out sunil and let us know please. _________________ The McDonald's are starting to get really bad around here. I found a handgun in my cheeseburger yesterday. |
|
| Back to top |
|
Andir Centurion

Joined: 21 Dec 2003 Posts: 184 Location: Chicago Area
|
Posted: Dec 24th, 2003 01:05 AM Post subject: |
|
|
Whoops No..I was wrong on that, Algar is right, 3 double quotes...I was thinking on the lines of String concatination and having an example where you need to do this:
BookTitle = "Talking Chickens"
thisString = "The title of the book is "" & BookTitle & ""."
Print thisString
The title of the book is "Talking Chickens".
Technically I'm doing the same thing as Algar stated though if you look at it right. _________________ If you happen to see little people sitting on your desk...don't tell anyone or they might think your crazy too. |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Dec 25th, 2003 04:36 PM Post subject: |
|
|
An easier way is how I show below (just simpler and easier to read afterwards, all work) :
You can use the Chr function that returns the " character or use a constant. Just to make simpler as I said
| Code: | Private Sub Form_Load()
MsgBox "Testing the quotes : " & Chr$(34) & "test" & Chr$(34)
Const Quote As String = """" 'or Chr$(34)
MsgBox "Testing the quotes : " & Quote & "test" & Quote
End Sub |
They both return the same  _________________ No one is completely useless. They can at least be an example of what to avoid.
Last edited by P.T.A.M. on Dec 25th, 2003 04:38 PM; edited 1 time in total |
|
| Back to top |
|
|