Excel VBA Range.Find -


i'm trying number list , search number in sheet using range.find() keep getting run-time error '91': object variable or block variable not set.

    dim integer     = 2     sheets("sheet1").activate     dim findit string     until cells(i, 1).value = "totals"     findit = sheets("sheet1").cells(i, 1) ' storing cpu id     sheets("ref").activate     columns("e").select     'on error goto nodice     selection.find(what:=findit, after:=activecell, lookin:=xlformulas, _     lookat:=xlwhole, searchorder:=xlbyrows, searchdirection:=xlnext, _     matchcase:=false, searchformat:=false).select     selection.offset(rowoffset:=0, columnoffset:=-2).select     selection.copy     sheets("sheet1").select     cells(i, 2).pastespecial (xlpastevaluesandnumberformats)     = + 1     loop 

the sheet "ref" exists, , findit contain value of cell. use same code in workbook. difference is, in workbook code works in, findit 1 cell , value general number, findit in problem workbook special number (a portuguese postal number). (when step through code, time selection.find rolls around, i've confirmed findit have value 70 , selection contains value 0070).


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -