2-Paste existing procedures or create new procedures.
3-Click Save.From the file dialog opened give any name(lets Say lib) and click OK.
Note:you must provide the double quotes around file name Ex-:”lib.vbs”
4-Library file is ready with extension .vbs.
Creating Library file with extension .qfl
1-from QTP Select File>New>Function Library.Opens a new function library to write functions.
2-Place procedures in the function library script editor.
3-Click Save icon.From Dialog opened enter your file name like lib.qfl and Click OK.
4-Library file is ready with extension .qfl
Associating/Adding Libraries to QTP
1-Select File>Setting.Test Setting Dialog will open.
2-Click + to add a library file.A file browse button will be displayed and select the file.
3-Automatic Relative Path conversion dialog appears.Select Yes to close this dialog and Click OK to close the Test Setting Dialog.
4-Click Check Syntax button to validate the syntax of functions in the library file.