Const ForReading = 1, ForWriting = 2
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\myasp\aa.txt", ForReading)
ReadLineTextFile = f.ReadLine
ReadLineTextFile = f.ReadLine
//////////////////文件只有一行内容,请问怎么解解决
输入超出文件尾
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\myasp\aa.txt", ForReading)
ReadLineTextFile = f.ReadLine
ReadLineTextFile = f.ReadLine
//////////////////文件只有一行内容,请问怎么解解决
输入超出文件尾
解决方案 »
- VB中的sql语句.请高手进入,急~!
- 急救!!listbox问题,在具有焦点的text中插入字符!!得解立刻给分,在线等!!
- 新人第一次报道,请教各位些问题,谢了!
- 请问将datagrid的选中记录由第n条移到第一条?
- 怎么用vb.net实现打印默认为横打?
- 各位大侠,我在VB中编写ASP组件访问数据库问题。
- 水晶报表中文版9.2 + VB6 关于“列”不固定的问题?
- 我调用了winexec函数,执行doc下的arj压缩工具,为什么不能压缩文件呀
- 如何增加datagrid控件的列数?
- ▁▂▃▄▅▆▇█▉[谁能更改窗口或控件的类,100分]█▇▆▅▄▃▂▁
- 十分紧急,在线等候,各位高手们帮帮忙,先谢谢了!!!
- 关于VB游戏开发
Private Sub Command1_Click()
Dim fso As FileSystemObject
Dim f As TextStream
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\myasp\aa.txt", , ForReading)
Do While Not f.AtEndOfLine
ReadLineTextFile = f.ReadLine
Debug.Print ReadLineTextFile
Loop
End Sub
Dim FileNumber As Integer
Dim FilePath As String, DataText As String......Open FilePath For Input As #FileNumber
Input #FileNumber, DataText
Dim FileNumber As Integer
Dim FilePath As String, DataText As String......Open FilePath For Input As #FileNumber
Input #FileNumber, DataText
//有些不会用,能不能照上面的代码改一下,谢了
或者侦测AtEndOfFile呗!
' 判断是否文件尾就可以了吧 不过是Eof(fso)还是fso.Eof我记不清了
if(Not Eof(fso)) Then
ReadLineTextFile = f.ReadLine
End if