|
-
Aug 23rd, 2012, 03:03 PM
#1
Thread Starter
New Member
[RESOLVED] Parts of macro made in 2007 not working in 2010
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|