Hello all,

I'm attempting to use a macro in Excel 2010 that a coworker made using Excel 2007. The majority of the macro works fine, excel for one section:

Private Function IsCheckedOut() As String
Sheet1.Range("H5").Select
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Select
If ActiveCell.Value = ScanNumber.Value Then
MsgBox "Found Scan Number"
If ActiveCell.Offset(0, 2).Value = "" Then
MsgBox "Not Checked Out"
IsCheckedOut = "Yes"
Exit Function
End If
End If
MsgBox "Looping to Next Row"
Loop
IsCheckedOut = "No"
End Function

I've added some message boxes to see where it gets, and in a situation where it should be setting "IsCheckedOut" to "Yes" it is not getting past the first "If" statement, I'm only seeing the "Looping to Next Row" box.

Any ideas why this is not working in 2010? All my googling has not yielded anything informative.