qosmioamit
New Member
- Joined
- Feb 17, 2011
- Messages
- 4
Hello folks,
I have this code that compiles and runs with no errors but nothing happens. I manually do it and it works!
Any help would be greatly appreciated
I have this code that compiles and runs with no errors but nothing happens. I manually do it and it works!
Code:
Sub fb34hunt()
Dim I As Integer
Dim J As Integer
Dim K As Integer
Dim L As Integer
Dim C As Integer
Dim S As Integer
Dim result As Long
Dim A As String
A = Sheets("Sheet5").Cells(4, 1)
Sheets("Sheet5").Cells(1, 4) = A & " faceplate's modules' history collection"
K = 1
For I = 2 To 7412
result = StrComp(A, Sheets("phv").Cells(I, 1), 1)
If result = 0 Then
For J = 2 To 12139
L = Len(Sheets("Sheet5").Cells(J, 3))
C = InStr(1, Sheets("Sheet5").Cells(J, 3).Value, "/", 0)
S = L - C
If InStr(1, Sheets("Sheet5").Cells(J, 3).Value, Sheets("phv").Cells(I, 1).Value, 0) > 0 Then
K = K + 1
Sheets("Sheet5").Cells(K, 4) = Right(Sheets("Sheet5").Cells(J, 3), S)
End If
Next J
End If
Next I
End Sub
Any help would be greatly appreciated