I can't figure out how to get rid of the Run-time error '1004':
My VBA code is supposed to write a simple ISERROR-function to the worksheet. When I type it manually and record a macro the code reads:
But when I try to make the code type the same function or run the recorded code I'm getting "Run-time error '1004' - Application-defined or object-defined error".
I thought I might be missing a reference so I tried adding the atpvbaen.xls just in case but it didn't help.
How do I get rid of the error?
My VBA code is supposed to write a simple ISERROR-function to the worksheet. When I type it manually and record a macro the code reads:
Code:
ActiveCell.FormulaR1C1 = _
"=IF(ISERROR(VLOOKUP(VALUE(E2),Pnro,5)),"""",VLOOKUP(E2),Pnro,5))"
I thought I might be missing a reference so I tried adding the atpvbaen.xls just in case but it didn't help.
How do I get rid of the error?