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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

METHOD OR DATA MEMBER NOT FOUND 1

Status
Not open for further replies.

gc1234

Programmer
Mar 4, 2004
94
GB
Hi

I've just upgraded to excell 2003 and get the above error on this line

startStockRow = Sheet2.Cells.Find("StartRow", [a1], xlWhole, xlByRows, xlPrevious).Row + 1



does not like Cells call, has it been superceded?
 
Script out of range after putting Wokrsheet at the front?

startRow = Worksheets("Sheet1").Cells.Find("EAN Code", [a1], xlWhole, xlByRows, xlPrevious).Row
 
You are missing an argument in the find function. Try this:

startRow = [Sheet2].Cells.Find("EAN Code", [a1], xlFormulas, _
xlWhole, xlByRows, xlPrevious).Row + 1

gc1234 is on the right track in that if Excel can not find the search string it will return the subscript out of range error. Use error handling to take care of that.

HTH,
Eric
 
Question, why am i changing my code after upgrading?
 
I'm using 2002 and that is the syntax for the find function. I don't remember about the earlier versions.

Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top