VB如何换行 ReceiveSms_Text.Text = ReceiveSmsStr 变量 ReceiveSmsStr里有文字

2025-01-03 20:51:31
推荐回答(2个)
回答1:

Private Sub Command1_Click()
'1、ReceiveSms_Text的MultiLine 设置为 True(ReceiveSms_Text属性里)
'2、替换|到vbcrlf
ReceiveSmsStr = "|2 24 8615018906704 收到 12-05-15 21:06:07|3 44 10086977 (03/03)复以上各数字序号,中间用逗号或分号分隔。回复免费。中国移动 12-05-16 10:59:51|4 40 10086977 (01/03)尊敬的客户,除套餐内包含的业务外,您正在使用的包月类增值业务"
ReceiveSmsStr = Replace(Mid(ReceiveSmsStr, 2), "|", vbCrLf)
ReceiveSms_Text.Text = ReceiveSmsStr
End Sub

可以百度HI找我

加入百度HI vb6专家群1358368

回答2:

把ReceiveSms_Text换成多行模式。然后把“|”换成 vbnewline 再用连接符连上。