View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Keturi John Keturi is offline
external usenet poster
 
Posts: 19
Default Paste value of Find

How do I get the value of c pasted into say C4, after the Do statement?
Should be easy, but I'm overlooking something? Thanks

Sub Find()
Dim myValue As Range
Set myValue = Range("C5")
With Worksheets(1).Range("a1:a100")
Set c = .Find(myValue, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
________________
y = MsgBox("Do you want to find Next?", vbYesNo, "Find Next?")
If y = vbNo Then Exit Do
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
End Sub