请问我该如何书写?
Open File1.Path & "\" & File1.FileName For Input As #1
If ? then
?
MsgBox "哈", vbOKOnly, "提示"
End If
Close #1
看附件:
上面的函数调用一下就可以返回指定行数的内容
按你的要求
dim s as string就行了
很容易啊:
Private Sub Command1_Click()...第10行第一个字符为A时,Msgbos"哈",否则不执行任何操作!
看附件:Private Sub Command1_Click()Dim f1, L, BY, rn = FreeFilef1 = App.Path & "\\1.txt"Open f1 For Input As nL = LOF(n) Do While Not EOF(n)Line Input #n, BYr = r + 1If r = 10 And Left(BY, 1) = "A" ThenMsgBox "哈"Exit SubElsePrint BYEnd If LoopClo...