Results 1 to 6 of 6

Thread: Quotes

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2000
    Posts
    35

    Unhappy 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]
    "..Follow the white rabbit.."

  2. #2
    Guest
    Use Chr$(34).

    Code:
    Text1.Text = Chr$(34) & "Hello" & Chr$(34)

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use double quotes:
    Code:
    Dim str as String
    str = "Hello=""Hi"""
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    for single quotes:
    Chr(39)
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2000
    Posts
    35

    Unhappy 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
    "..Follow the white rabbit.."

  6. #6
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width