Thread: FindNext
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sharad Naik Sharad Naik is offline
external usenet poster
 
Posts: 212
Default FindNext

How about this, in place of c.????? ?

y = MsgBox("Do you want to find next 'c' ?", vbYesNo, "Hello there")
If y = vbYes Then Exit Do

Sharad

"John Keturi" wrote in message
news:MH0cd.34248$hj.16805@fed1read07...
Need help finishing code(??????). Once it finds "c", I want to paste that
value in cell "C4", but then PAUSE, and wait for user input. If the user
selects "next", then loop to find the next "c". 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
c.????????
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With