Nigel Brown75
New Member
- Joined
- Jul 16, 2007
- Messages
- 2
Hi All,
I get the following error when running the below code ("Object variable or with block variable not set") it stalls after doing the update on the loop. Is it also possible to have this search for 2 or 3 parameters - i.e Set C = .Find("Wrap", LookIn:=xlValues) Or Find("Put", LookIn:=xlValues) ??
With Worksheets("Original").Range("af2:af500")
Set C = .Find("Wrap", LookIn:=xlValues)
If Not C Is Nothing Then
firstAddress = C.Address
Do
C.Value = "CPPT"
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
End With
Thanks
Nigel
I get the following error when running the below code ("Object variable or with block variable not set") it stalls after doing the update on the loop. Is it also possible to have this search for 2 or 3 parameters - i.e Set C = .Find("Wrap", LookIn:=xlValues) Or Find("Put", LookIn:=xlValues) ??
With Worksheets("Original").Range("af2:af500")
Set C = .Find("Wrap", LookIn:=xlValues)
If Not C Is Nothing Then
firstAddress = C.Address
Do
C.Value = "CPPT"
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
End With
Thanks
Nigel