如题~在服务器的文件夹中有一个文件夹,里面有个文本文件~下面的方法能否实现呢?因为我这没有局域网,所以不感确定~
Dim Str As String
Dim m As String
Dim d As String
Dim h As String
Text1.Text = ""
On Error GoTo error
m = Format(Month(Date), "00")
d = Format(Day(Date), "00")
h = Format(Hour(Now), "00")
Open "//192.168.1.1/fxyb/dq" & m & "" & d & "" & h & ".txt" For Input As #1
Do While Not EOF(1)
Input #1, str1
Str = Str & str1 & Chr(13) & Chr(10)
Text1 = Str
Loop
Close
error:
If Err.Number <> 0 Then
MsgBox Err.Description
Exit Sub
End If
Dim Str As String
Dim m As String
Dim d As String
Dim h As String
Text1.Text = ""
On Error GoTo error
m = Format(Month(Date), "00")
d = Format(Day(Date), "00")
h = Format(Hour(Now), "00")
Open "//192.168.1.1/fxyb/dq" & m & "" & d & "" & h & ".txt" For Input As #1
Do While Not EOF(1)
Input #1, str1
Str = Str & str1 & Chr(13) & Chr(10)
Text1 = Str
Loop
Close
error:
If Err.Number <> 0 Then
MsgBox Err.Description
Exit Sub
End If
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货