在保存TEXT中的文件时如何判断某行是否为空如果为空则不保存继续保存下面一行
我的代码
On Error GoTo abc
If Text2 <> "" Then'CommonDialog1.ShowSave
CommonDialog1.FileName = App.Path & "\bingbz.dre"
Open CommonDialog1.FileName For Append As #1
Print #1, Text2
Close #1
Text2.Text = ""
MsgBox "添加成功", 64, "提示"
Else
Exit Sub
End If
abc:
我的代码
On Error GoTo abc
If Text2 <> "" Then'CommonDialog1.ShowSave
CommonDialog1.FileName = App.Path & "\bingbz.dre"
Open CommonDialog1.FileName For Append As #1
Print #1, Text2
Close #1
Text2.Text = ""
MsgBox "添加成功", 64, "提示"
Else
Exit Sub
End If
abc:
解决方案 »
- cBottons和dwextraInFo参数是什么意思
- 求求各位给点提示我不知道如何把我查询后数据库给出的数据集分开放到不同的变量中去求各位高手指教菜鸟我
- 再问,在RichTextBox中如何区分....???
- VB控制EXCEL解决001变成1的两种方法为什么都不行啊??
- 如何在static变量中初始化其他值
- winsocket控件传送 列表框中的内容
- (在线等候)在网上用ASP编的程序, 现想在下面用编程访问网上的数据库如何做?
- 如何编程获得远程计算机某一文件的信息,如:版本,大小等等!!
- 请教一个关于Crystal Report分行打印问题?谢了!
- vb串口通讯
- 求助,关于combobox的问题
- 豆子进来
CommonDialog1.FileName = App.Path & "\bingbz.dre"
Open CommonDialog1.FileName For Append As #1
Print #1, Text2
Close #1
Text2.Text = ""
MsgBox "添加成功", 64, "提示"
Else
Exit Sub
End If
abc:
dim i as long
a = split(Text1.Text, vbCrLf)
for i=0 to ubound(a)
if lenb(a(i))<>0 then Print #1, a(i)
next