简体   繁体   中英

Excel 2007 VBA issue with structured references

If I create a range from a structured reference and do try to run a find function, Excel throws a 50290 Error Application-defined or object-defined error . From what Google says, the error seems to be related to a missing reference. What that missing reference is is not obvious from looking through Tools/References.

 Set colRange = Range("TABLE[COLUMN]")
 Set r = colRange.Find(id, LookIn:=xlValues)

Line 2 throws the error. The colRange variable looks just fine in the watch window. I can extract values from it using .Cells property. Find (Ctrl+F) works fine. I hope I am not overlooking something simple.

If its not able to find id in colrange then reference to object r is not defined. and when u use any property of object r, it will throw error.

hope this answer your query, if not paste ur code here, will check that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM