用strcompDim file1() As Byte
Dim file2() As Byte
Open "D:\bak\notice.txt" For Binary As #1
If (LOF(1) = 0) Then
Close #1
End If
ReDim file1(LOF(1))
Get #1, 1, file1
Close #1
Open "D:\bak\SETUP.zip" For Binary As #1
If (LOF(1) = 0) Then
Close #1
End If
ReDim file2(LOF(1))
Get #1, 1, file2
Close #1
If VBA.StrComp(file1, file2, vbBinaryCompare) = 0 Then
MsgBox "一样"
Else
MsgBox "不同"
End If
Dim file2() As Byte
Open "D:\bak\notice.txt" For Binary As #1
If (LOF(1) = 0) Then
Close #1
End If
ReDim file1(LOF(1))
Get #1, 1, file1
Close #1
Open "D:\bak\SETUP.zip" For Binary As #1
If (LOF(1) = 0) Then
Close #1
End If
ReDim file2(LOF(1))
Get #1, 1, file2
Close #1
If VBA.StrComp(file1, file2, vbBinaryCompare) = 0 Then
MsgBox "一样"
Else
MsgBox "不同"
End If
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货