View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] pfsardella@yahoo.com is offline
external usenet poster
 
Posts: 96
Default If no FIND value is found, then a Msgbox to say so and exit sub

The alterations are untested.

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
Sub BookReturnDate()

Dim aList As Range
Dim rngFind as Range
Dim Bcode As Variant

Bcode = Range("A1").Value
If Bcode = "" Then Exit Sub

Set aList = Range("G2:G2505")
On Error Resume Next

Set rngFind = aList.Find(What:=Bcode)
If not rngFind is Nothing Then
rngFind.Offset(0, 2).Value = Now
Else
msgbox "Goof Up"
End If

End Sub