Dim FirstFile As String, SecondFile As String
Open "c:\file1.txt" For Binary As #1
FirstFile = Space(LOF(1))
Get 1, , FirstFile
Open "c:\file2.txt" For Binary As #2
SecondFile = Space(LOF(2))
Get 2, , SecondFile
If FirstFile = SecondFile Then
MsgBox "Files are the same."
Else: MsgBox "Files are NOT the same."
End If
Close