主题:请教一个VB长字符串的问题
在word中想将一文件全部读入放到一个字符串变量中,发现只能读253个字符。但VB不是说可以放2^31个字符吗?至少也要放64K个字符啊!请问该怎么解决?程序如下
Sub Macro1()
Dim hFile As Long
hFile = FreeFile
Open "d:\temp\a.txt" For Input As hFile
Dim str As String
str = Input(LOF(hFile), #hFile)
End Sub
Sub Macro1()
Dim hFile As Long
hFile = FreeFile
Open "d:\temp\a.txt" For Input As hFile
Dim str As String
str = Input(LOF(hFile), #hFile)
End Sub