you cannot use AOM directly in qtp. It will hang out. If you give
set App= createobject("quicktestApplications") it will hang.
and as I dont think so you cannot add the the vbs file under ressources settings at runtime if you are sit inside the QTP and execute the above code.
Most general soultion will be :
1. Create vbs file and keep all the functions call the file using execute file method
if you want to access the your funclib.vbs file for each test, create actiontemplate.mst file and deploy in to dat folder.
1.Create a ActionTemplate.mst file
2.Write Executefile ("C:\funclib.vbs")
3.save the file
Now when ever you open the QTP your executefile("c:\funclib.vbs") also will load.
Add your .vbs function libraries there. After that, you don't have to script anything else, just directly call the function and it will check all your associated vbs files in your associated function library =)