I have two subs, First sub "Find" finds all the values in column G , range (G1:G10) , there i have three values so it loops 3 times and gives me the value.
Now i am calling a second sub "Find2" to find that value in column A, range (A1:A10). the problem is it runs only once.. it is not looping three times to get 3 values. Any idea ?. why it is not working.
Sub Find()
Set shtSheet1 = Sheets("Sheet1")
With shtSheet1.Range("G1:G10")
Set V = .find("*", LookIn:=xlValues)
If Not V Is Nothing Then
FirstAddress = V.Address
Do
X = V
Call Find2
Set V = .FindNext(V)
Loop While Not V Is Nothing And V.Address <> FirstAddress
End If
End With
End Sub
Second sub
Public Sub Find2()
Set shtSheet1 = Sheets("Sheet1")
Set shtSheet2 = Sheets("Sheet2")
With shtSheet1.Range("A1:A10")
Set C = .find(X, LookIn:=xlValues)
If Not C Is Nothing Then
MsgBox X
End If
End With
End Sub