VB高手,请问这段调用记事本的代码错在哪里?应该怎么改?
这段代码用来比较字符串。比较字符串的相同与不同。m = 19
i = 6
For i = 6 To m
Open "g:\code\1.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, str
st = Trim(str)
If st = s(i) Then
d.cells(i, 4).interior.colorindex = 22
Else
d.cells(i, 4).interior.colorindex = 10
End If
Loop
Close #1
Next i --------------------编程问答-------------------- notepad 记事本程序。 --------------------编程问答-------------------- 您的錯誤提示為何?以下是我的處理方法讀取數據。
Public Function PSubReadConf_Status()
Dim fso As New Scripting.FileSystemObject
Dim myTxt, i
On Error GoTo eNext:
Set myTxt = fso.OpenTextFile(FileName:=App.Path + "\Status.conf", IOMode:=ForReading)
With myTxt
i = 1
Do Until .AtEndOfStream
'Me.Controls("Text" & i).Text = .ReadLine
PstrConfArr_Status(i) = .ReadLine 'StringEnDeCodecn(rcStr, 75)
'Debug.Print strConfArr(i)
i = i + 1
Loop
.Close
End With
Exit Function
eNext:
MsgBox Err.Description, vbCritical, Err.Number
End Function --------------------编程问答-------------------- 错误提示?
补充:VB , 数据库(包含打印,安装,报表)