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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -