I'm getting a "subscript out of range error" in my script at the following line
Before this line is called I do the following
The error comes back as "subscript out of range" but it doesn't tell me which of the arrays is the problem. I've checked and they all return back with an UBound of 48. What I don't understand is what sets the upper bound for what .AddItems is looking for in the arrays? I thought it was NumItems, but I don't think that's it now.
Thanks for any help!
Joe
Code:
Groups.OPCItems.AddItems NumItems, szItems(), clntHdls(), svrHdls(), Errors()
Before this line is called I do the following
Code:
Set objServer = CreateObject("OPC.Automation")
Set Groups = objServer.OPCGroups.Add("PlanGroup")
NumItems = 48
ReDim szItems(NumItems)
ReDim clntHdls(NumItems)
ReDim svrHdls(NumItems)
ReDim Errors(NumItems)
The error comes back as "subscript out of range" but it doesn't tell me which of the arrays is the problem. I've checked and they all return back with an UBound of 48. What I don't understand is what sets the upper bound for what .AddItems is looking for in the arrays? I thought it was NumItems, but I don't think that's it now.
Thanks for any help!
Joe