How to break long string to multiple lines

前端 未结 4 592
清歌不尽
清歌不尽 2020-12-06 03:54

I\'m using this insert statement in my code in vba excel but i\'m not able to break it into more than one line

SqlQueryString = \"Insert into Employee values         


        
4条回答
  •  执笔经年
    2020-12-06 04:52

    You cannot use the VB line-continuation character inside of a string.

    SqlQueryString = "Insert into Employee values(" & txtEmployeeNo.Value & _
    "','" & txtContractStartDate.Value &  _
    "','" & txtSeatNo.Value & _
    "','" & txtFloor.Value & "','" & txtLeaves.Value & "')"
    

提交回复
热议问题