I'm struggling with this bit of VBA code. For some reason I keep getting: "Run-time error '1004': Application-defined or object defined error" message. My only thought on why this may be is that I have the macro associated with a command button that is tied to a specific sheet - if this is the error, how can I resolve it? Otherwise, what might be the error here?
The line causing the error is the one beginning with MsgBox.
Sub Process()
Sheets("Intermediate").Cells(2, 1).Select
Dim contains As Range, lastRow As Long
Do Until IsEmpty(ActiveCell)
MsgBox Sheets("Document Library").Columns(1).Find(ActiveCell.Value)
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Thank you!