CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Quotation Marks

  1. #1
    Join Date
    Apr 2001
    Location
    USA
    Posts
    28

    Quotation Marks

    Hi everybody!!!
    I need some help.
    I have to write the quotation mark character in a variable.
    For example, the variable value is: hello"world
    How can I do that?

    Thanks


  2. #2
    Join Date
    Apr 2001
    Posts
    11

    Re: Quotation Marks

    Use two double quotes in a row:

    strVar = "Adam said, ""VB is maddening sometimes."""

    The value of strVar is Adam said, "VB is maddening sometimes."


  3. #3
    Join Date
    Aug 2000
    Location
    KY
    Posts
    766

    Re: Quotation Marks

    put the code in a bas module and then call like this

    Text1 = ReplaceQuote(Text1)


    public Function ReplaceQuote(Text as string) as string
    ReplaceQuote = Replace(Text, Chr(34), Chr(34) & Chr(34))
    End Function





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

Featured