|
-
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.
-
Aug 23rd, 2012, 03:37 PM
#2
Thread Starter
New Member
Re: Parts of macro made in 2007 not working in 2010
It appears to be something other than just 2007 vs 2010 because some people are hitting this problem while running it in 2007 also. I can't figure out why it's not working.
-
Aug 23rd, 2012, 03:54 PM
#3
Thread Starter
New Member
Re: Parts of macro made in 2007 not working in 2010
Turns out the code is not working for number only values, but throw some text in there and it works fine. Figured it out myself!
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
|