Double quote

HI All,

        I'm trying to export out the field values in double quotes.I was testing out something

The code is

retval = obusobj.GetValue("InvoiceNo$",InvoiceNo)

InvoiceNo = """InvoiceNo"""

msgbox InvoiceNo

Let's say the invoice no is 0000001

I want the msgbox to display "0000001"

I want the double quotes to appear in the output.Please help.

Thank You.

  • 0

    VBScript uses the ampersand character (&) to concatenate strings. It appears that you have already figured out the trick about escaping the double quote character.

    So, what you want is:

    InvoiceNo = """" & InvoiceNo & """"

    Some people prefer to use the ascii code instead,

    InvoiceNo = Chr(34) & InvoiceNo & Chr(34)

    Both will get you the result you want.