How execute product selection script ?

Hi Experts,
I am having a prodcut selection script in visual basic. I want to know how to execute the code with the given parameters. When I execute the code I am getting null pointer exception. Advice me how to avoid this.
Thanks.
Regards,
Desireenataliaa
