Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error with Set statement while running vba code 1

Status
Not open for further replies.

owentmoore

Technical User
Jul 20, 2006
60
IE
Hi all,

I am getting error code "unable to get the find property of the range class" while executing the set statement in the following code. I can't see what the problem is with the code. Does anyone have any ideas?

Code:
Range("IV" & lRow1).Select

With ActiveSheet
    Do
        With ActiveSheet.Range("BE" & lRow1 & ":CG" & lRow1)

        If lRow1 < lRow2 Then

        Set strSearch = .Find(",", AFTER:=ActiveCell, LookIn:=xlValues, LookAt _
                :=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious)
etc........

If I need to post the whole code let me know and I will....

Thanks
Owen
 
Are you sure the active cell is in the searched range ?
What happens if you simply omit the After named argument ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yep - I figured it out after reading PHV's reply.

Thanks guys.
Owen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top