バイナリでファイル読み込んで無理やりテキスト変換&比較する技
Function ReadBmpAsString(file_name As String) As String
Dim bmp() As Byte
Open file_name For Binary As #1
ReDim bmp(LOF(1))
Get #1, , bmp
Close #1
ReadBmpAsString = bmp
End FunctionSub ファイルの比較()
Const IMAGE_FOLDER = "C:\Work\imageMSO\"
Dim fileA As String: fileA _
= ReadBmpAsString(IMAGE_FOLDER & "AcceptProposal.bmp")
Dim fileB As String: fileB _
= ReadBmpAsString(IMAGE_FOLDER & "AcceptInvitation.bmp")
Dim fileC As String: fileC _
= ReadBmpAsString(IMAGE_FOLDER & "AcceptAndAdvance.bmp")
Debug.Print fileA = fileB
Debug.Print fileA = fileC
Debug.Print fileB = fileC
End Subネタ元