vba - How to break long string to multiple lines -
i'm using insert statement in code in vba excel i'm not able break more 1 line
sqlquerystring = "insert employee values(" & txtemployeeno.value & " _ ,'" & txtcontractstartdate.value & "' _ ,'" & txtseatno.value & "' _ ,'" & txtfloor.value & "','" & txtleaves.value & "')"
it giving error "expected end of statement". plz help.
you cannot use vb line-continuation character inside of string.
sqlquerystring = "insert employee values(" & txtemployeeno.value & _ "','" & txtcontractstartdate.value & _ "','" & txtseatno.value & _ "','" & txtfloor.value & "','" & txtleaves.value & "')"
Comments
Post a Comment