How to add double quotes in a string literal

前端 未结 7 2085
孤街浪徒
孤街浪徒 2021-01-17 15:09

Example code:

Dim a As String
a = 1234,5678,9123

I want to add literal double quotes to the variable a

Expected Output

7条回答
  •  情书的邮戳
    2021-01-17 15:33

    You just use Chr$(34) to insert a double quotes.

    Eg:

    Dim i as String

    i = Chr$(34) & "Hello World" & Chr$(34) 'Shows "Hello World"
    

提交回复
热议问题