PDA

View Full Version : Copy to another sheet with find variable range



tlchan
01-09-2013, 06:28 AM
Hi, I am stuck with copy entire row for the found value (X) in workbook(testbook.xls) to sheet("outputsummary") in Master summary.xls. Error as "runtime error 13, Type mismatch with error highlight at following

Set Rng = findrange.Find(What:=MyArr(I), _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)


Anybody can assist to complete the error?

Thanks

tlchan
01-09-2013, 06:31 AM
testbook.xls attached

BrianMH
01-09-2013, 06:36 AM
I (http://www.vbaexpress.com/forum/showthread.php?t=44929) don't get an error there. I assume you are entering the column as a number as I get an error when entering a letter (your messagebox may want to make that clearer).

tlchan
01-09-2013, 07:16 AM
Rerun with number end up with run time error 1004 -Application defined or object defined error. Message meant for letter but did not work as well.

BrianMH
01-09-2013, 07:49 AM
If you click debug on what line do you get that error?

tlchan
01-09-2013, 05:13 PM
As per my 1st question.