Open filenamea For Input As #1
Do Until EOF(1)
Line Input #1, temps
n = n + 1
Loop是这样的,想用N来控制,随意读取行,不知行不
不想这样,因为中间要等待其它模块的执行,所以想到用了用N
Open filenamea For Input As #1
Do Until EOF(1)
Line Input #1, temps
pass=temps
......
.....
.....
Loop
Do Until EOF(1)
Line Input #1, temps
n = n + 1
Loop是这样的,想用N来控制,随意读取行,不知行不
不想这样,因为中间要等待其它模块的执行,所以想到用了用N
Open filenamea For Input As #1
Do Until EOF(1)
Line Input #1, temps
pass=temps
......
.....
.....
Loop
解决方案 »
- 新手问题????
- 把文件先saveas,再后面来个kill该文件,运行后,文件是生成了,但会报拒绝的权限错误,这是什么道理?
- 难题,想在frontpage软件的右键菜单自己添加一项内容,用什么函数?
- 如何将属性页中的数据在运行时显示?
- vb 中Notify是什么意思
- 我就问一个句子,sql中的insert
- VC一定比VB强吗?我这样的问题用什么工具较好?
- 关于 Excel 打印报表的问题
- 高分寻求Truegrid7.0的注册码!!!!!(400)
- 急急,谢谢,怎样才能让编译好的.EXE文件在系统进程中看不到
- 请大家给出个点子(想做vb作品)
- 问个问题,CreateFile函数第四个参数怎么理解?
dim a()
Open filenamea For Input As #1
Do Until EOF(1)
Line Input #1, 每行
总行=总行 & 每行 & vbcrlf '[总行=所有的数据]
n=n+1 '[记录有多少条数据]
loop
close #1
a=split(总行,vbcrlf) '[把数据的每行放到数组a 中]
'[a(0)=第一行]
'[a(1)=第二行...类推]
'[要提取第3行的内容 找到 a(3-1)就可以了]
Dim str As String
Dim str1 As String
Dim NextLine As String
Dim Txt_sj As String
Dim l As Integer
Dim n As Integer
n = Val(Text1)
CommonDialog1.ShowOpen
Text1 = ""
Open CommonDialog1.FileName For Input As #1
Do While Not EOF(1)
Input #1, str1
str = str & str1 & Chr(13) & Chr(10)
Text1 = str1
l = l + 1
If l = 5 Then '指定读取的行数
Exit Do
End If
Loop
Close
Text3 = l
MsgBox "第" & l & "行的内容" & vbCrLf & Txt_sj, vbExclamation, "内容" ' & str1
End Sub