Hi,
I could not find any issues in the script except that
Set createBrwsrObj = o it should be Set createSingleObj = 0.
I assume you want to return to the calling function.
Also,
It would be better if you pass the property and values in an array so that you can pass n no of Prop Value pairs you want. You will not be limited to use just 1 Prop and value.
I could not find any issues in the script except that
Code:
Public Function createSingleObj(t, p, val)
Set o = Description.Create
o("micclass").Value = t
o(p).Value = val
Set createBrwsrObj= o
End Function
I assume you want to return to the calling function.
Also,
It would be better if you pass the property and values in an array so that you can pass n no of Prop Value pairs you want. You will not be limited to use just 1 Prop and value.
Code:
createSingleObj("Browser","CreationTime:=0,title:=AOL.*")
Public Function createSingleObj(t,arrPV)
Set o = Description.Create
o("micclass").Value = t
arrPV = Split(arrPV,",")
For iLoop = 0 to UBound(arrPV)
Prop= Split(arrPV(iLoop),":=")(0)
Val= Split(arrPV(iLoop),":=")(1)
o(Prop).Value = Val
Next
Set createSingleObj = o
End Function