Dear Xcellent advisors,
This program is using a variable defined by the user from a drop-down list to identify a target row on another worksheet.
If the variable is present, there are no problems. But I am getting an 'Object variable or With block variable not set' error. The internet seems to want me to define the variable as an object and to add 'Set'. I don't know that I want it to be an object though? Isn't it just a value?
Please help!
---------------
'start search based on series (zcell) here
'Find variable in 'series' input cell
Cells(10, 4).Select
zcell = ActiveCell.Value
'Start search by series on "IEC wuxi" worksheet; no loop assumes one occurence per page
Sheets("IEC wuxi").Select
'GETTING ERROR IF VARIABLE NOT PRESENT ON SHEET
'find variable somewhere on active sheet
Cells.Find(What:=zcell, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, MatchByte:=False, SearchFormat:=False).Select
'Find required corresponding certification and copy
SerRow = ActiveCell.Row
Cells(SerRow, 6).Select
Selection.Copy
'select data output page and paste to next available empty row
Sheets("Search Product").Select
Range("H13").Select
varnbrows = ActiveCell.Rows.Count
ActiveCell.Offset(varnbrows, 0).Select
ActiveSheet.Paste
Selection.Interior.ColorIndex = 34
Selection.Interior.ColorIndex = 34
Selection.Font.ColorIndex = 1
Selection.Font.ColorIndex = 1
Bookmarks