Dim babe As Object
Dim i As Integer
Dim j As Integer
Set babe = CreateObject("Excel.application")
babe.Visible = True
Set baby1 = babe.workbooks.Open(Me!Text0.Value)
Set baby2 = babe.workbooks.Open(Me!Text2.Value)
With baby1
For i = 1 To 300
For j = 1 To 30
If .Sheets(1).Cells(i, j) <> baby2.Sheets(1).Cells(i, j) Then
baby2.Sheets(1).Cells(i, j).Font.Color = RGB(0, 255, 0)
baby2.Sheets(1).Cells(i, j).Font.Size = 20
End If
Next
Next
.Save
baby2.Save
End With
babe.Quit
Set babe = Nothing
MsgBox "The comparision has finished. The result was saved in your second file"