I'm struggling with the scripts again.

I have a complicated script with some variables per iteration.

When I ran it I realized that it was only running 1 variable per iteration because I'm using the datatable.

So I put the iterations into the global table and the variables into the local table. Still runs 1 variable per iteration based on the row number of the iteration.

So, I broke off the part of the script that uses the variables into a separate action. Then it broke because the 1st action calls a function defined in the second function. Luckily I have this function in an external VBS file, so I used "Executefile" instead of a "Call"

Then QTP went crazy. I started getting errors on my first line, which is a comment. I removed the comment. Still crazy.

I saved, closed and reopened QTP.

I reran the script. It errors out on the first line of the script which is a declaration of variables, it does so in mid run, about where I have it ExecuteFile, but those variables are not used in that external vbs function. Why would it go to ExecuteFile, then go back to the top of the script and read the 1st line: "Dim strVariable1, strVariable2 " and give me an error: Invalid Procedure call or argument"

My suspicion is that I've done the external call wrong. I've put a function into that external function and I haven't figured out how to give it the argument when I make the ExecuteFile call.

I've looked at the User's Guide but it's pretty spartan with it's information. It doesn't even bother to tell you that you need to put "" around your file name/path.

Please feel free to supply either direct help or a good set of keywords for a more effective search on this site.

Your patience is appreciated.

tester, part of the vbscript cargo cult.