vb怎么在文本中生成tab空格
答案:3 悬赏:40 手机版
解决时间 2021-03-23 19:05
- 提问者网友:伴风望海
- 2021-03-23 00:48
vb怎么在文本中生成tab空格
最佳答案
- 五星知识达人网友:天凉才是好个秋
- 2021-03-23 01:05
'把文本文件“c:\aaa.txt”中的字符“[”全部替换成tab空格的代码,请参考。
Private Sub Command1_Click()
Txt = "c:\aaa.txt" '文本路径
Open Txt For Input As #1
t = StrConv(InputB(LOF(1), 1), vbUnicode)
Close #1
t = Replace(t, "[", Space(1))
Open Txt For Output As #1
Print #1, t
Close #1
MsgBox "修改成功"
End Sub
'
Private Sub Command1_Click()
Txt = "c:\aaa.txt" '文本路径
Open Txt For Input As #1
t = StrConv(InputB(LOF(1), 1), vbUnicode)
Close #1
t = Replace(t, "[", Space(1))
Open Txt For Output As #1
Print #1, t
Close #1
MsgBox "修改成功"
End Sub
'
全部回答
- 1楼网友:忘川信使
- 2021-03-23 02:43
"字符串" & vbTab
Space(空格数量)
"字符串" & Space(1)
- 2楼网友:街头电车
- 2021-03-23 02:05
private sub command1_click()
print "a"; vbtab; "b"
print "a1234"; vbtab; "c567"
end sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯