Manage quotes inside string VBA

后端 未结 1 923
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-22 05:58

I trying to insert to Access Table some values that I getting from another table, the problem is that some values comes with quotes and double quotes inside the string, like

相关标签:
1条回答
  • 2020-12-22 06:17

    From memory I think you just need to double them up to look like this:

    str1 = "Non-fusible sectionalizing ""green' low rise switch."
    

    You can perform a Replace on the string using Chr(34) - the " character:

    str1 = Replace(str1, Chr(34), Chr(34)&Chr(34))
    
    0 讨论(0)
提交回复
热议问题