How to add double quotes in a string literal

前端 未结 7 1981
孤街浪徒
孤街浪徒 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:48

    The current answers are correct and valid but sometimes the following can improve readability:

    a = Chr$(34) & "1234,5678,9123" & Chr$(34)
    

提交回复
热议问题