on 10-22-2008 5:49 PM
Hi,
I am creating a macro in Excel which would load asset data through SAPGui Scripting but I am running into a very strange problem.
In order to be sure that the data get's loaded to correct system I have created inputbox where all the open systems are listed and the user should select one by entering a corresponding number. (it's the number of connection object in Application.Connections collection) When this number is used as a variable in
Set App = SapGuiAuto.GetScriptingEngine
...
Dim I
I = InputBox(ItemText, "Select open system", 0)
Set Connection = App.Children(I)
Then the system returns following message:
Run time error '618'
Bad index type for collection access
Anybody has any ideas what might be wrong?
Hi Peeter Parelo:
Please try the following:
...
'Dim I
I = InputBox(ItemText, "Select open system", 0)
Set Connection = App.Children(int(I))
...
end sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.