locked
Quotes RRS feed

  • Question

  • So here is my problem I need the value of one of my variables to be

    "IP_

    Just one quote, but Visual Basic isn't letting me. I read something about Chr(&H22), but that didn't help.

    Thanks again.

     

    Saturday, March 27, 2010 10:28 PM

Answers

  • Use """, as in

    Dim myVar as string = """IP_"

    • Marked as answer by KirbyKo Sunday, March 28, 2010 12:42 AM
    Saturday, March 27, 2010 10:48 PM

All replies

  • Try Chr(34)
    Saturday, March 27, 2010 10:36 PM
  • When writing a string, use 2 quote marks to represent a single quote mark in the string itself.

     

    Dim myVar As String
    myVar = """IP_"

    Saturday, March 27, 2010 10:44 PM
  • Use """, as in

    Dim myVar as string = """IP_"

    • Marked as answer by KirbyKo Sunday, March 28, 2010 12:42 AM
    Saturday, March 27, 2010 10:48 PM
  • Use """, as in

    Dim myVar as string = """IP_"

    Saturday, March 27, 2010 10:49 PM
  • Actually I did this :

            a = a & Chr(&H22)
            a = a & "IP_"

    Saturday, March 27, 2010 10:50 PM