#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default FindNext

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Findnext Noemi Excel Discussion (Misc queries) 1 December 12th 05 11:23 AM
FindNext SJ[_6_] Excel Programming 7 May 21st 04 06:01 AM
findnext issues mark kubicki Excel Programming 3 February 15th 04 03:22 AM
FindNext problem mark kubicki Excel Programming 4 February 14th 04 02:42 AM
problem with .FindNext Bob Cochran Excel Programming 6 October 11th 03 02:02 PM


All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"