Did you automatically generate QTP settings?
it's advisable to run this script as stand alone script, by double clicking on it.
Sometimes, such a settings script might conflict with QTP current settings.
If it is your functional script -
try to debug it, by copying it directly into QTP ExpertView. You will see what exactly line gives the error. After correcting that, you can copy the code back into VBscript and add it into lib.
If you need more help - post here detailed information. There is hundreds of reasons to get such a Error. And a lot of solutions to fix it.