Hello All,
I'm working on my first OTA script. I'm just creating an excel report displaying Detail Business REQs, their linked Functional REQs, and then the Tests that cover those Functional REQs.
I'm generally confused about when I should use a SET statement to assign an object instance to a variable as opposed to using the normal assignment operator. I generally work through this type of confusion by working with the examples I can find and once I see a few variations of a theme I can figure it out.
The problem I am having though is example syntax doesn't seem to work. Specifically the "As" clause of a dim statement. If I use

<font class="small">Code:</font><hr /><pre>Dim RQReq as Req </pre><hr />
Or even

<font class="small">Code:</font><hr /><pre> Dim RQIndex as Integer </pre><hr />
I get a WSH error "Expected end of Statement"

If I take out the "As" it's ok, but I don't know
A) What the "as" is doing so I can accomplish the same thing in a different way
B)How to appropriately instantiate the QC objects.

I have an example script (off the internet) that creates a report of defects that works. It's QC code looks like this:

<font class="small">Code:</font><hr /><pre>
Dim BugFactory
Dim BugList
Set BugFactory = QCConnection.BugFactory
Set BugList = BugFactory.NewList("")
</pre><hr />

but when I try to do this:
<font class="small">Code:</font><hr /><pre>
Dim RQReq
Set RQReq = QCConnection.Req
</pre><hr />
I get a WSH error saying "Object doesn't support this property or method:'Req'"

Can someone give a me a clue or point me to some doc that will explain these basic concepts? I have looked extensively on the internet and HP doc and can only find random examples without a clear description of what the particular syntax is doing.

Thank you in Advance for your time and consideration,