Im not to good with counts yet
if i wanted to do a count
with this code
Dim mgs2
mgs2 = CLng(InputBox("Enter Selection To Find", "Hello"))
Cells.Find(What:=(mgs2), After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
and then count how many times mgs2 appeared on screen what extra code would i need?
I had this but it only goes once then leaves the for
Dim mgs2
Dim mgstotal
mgs2 = CLng(InputBox("Enter Selection To Find", "Hello"))
Cells.Find(What:=(mgs2), After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
For Each mgs2 In Cells.FindNext(After:=ActiveCell)
mgstotal = msgtotal + 1
Next
This message was edited by brettvba on 2002-04-29 21:43
if i wanted to do a count
with this code
Dim mgs2
mgs2 = CLng(InputBox("Enter Selection To Find", "Hello"))
Cells.Find(What:=(mgs2), After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
and then count how many times mgs2 appeared on screen what extra code would i need?
I had this but it only goes once then leaves the for
Dim mgs2
Dim mgstotal
mgs2 = CLng(InputBox("Enter Selection To Find", "Hello"))
Cells.Find(What:=(mgs2), After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
For Each mgs2 In Cells.FindNext(After:=ActiveCell)
mgstotal = msgtotal + 1
Next
This message was edited by brettvba on 2002-04-29 21:43