以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请教空行删除  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=78474)

--  作者:hbhb
--  发布时间:2015/12/9 18:48:00
--  请教空行删除
大师:请教如何条件删除转行符?
”字符1“ & vbcrlf & "字符2" & vbcrlf & "字符3"
如何实现某一字符为空就不换行?


--  作者:大红袍
--  发布时间:2015/12/9 19:23:00
--  

Dim str As String = "123"

str = iif(str > "",  str & vbcrlf, str)

Dim str1 As string = ""

str1 = iif(str1 > "",  str1 & vbcrlf, str1)

Dim str2 As string = "456"

str2 = iif(str2 > "",  str2 & vbcrlf, str2)

 

msgbox(str & str1 & str2)