Skip to Content
Former Member
Feb 26, 2008 at 01:28 PM

Bad index type for collection access ???


Hi there,

I am writing a script in VBA to connect to SAP.

I encountered something strange.

Why does this work:

Set oSession = oConnection.Children(0)

But this isn't:

X = 0

Set oSession = oConnection.Children(X)

It results in an error: "Bad index type for collection access"

Regards, Bas Prins