Hi, I'm new in the community and I'm also new with SAP, so sorry for any errors.
For my work I need to open SAP by excel (VBA); and I have found the code below but it don't work.
Sub Work()
Set app = CreateObject("Sapgui.ScriptingCtrl.1")
Set Connection = app.openconnection("my system", True)
Set session = Connection.Children(0)
session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "Client"
session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "User"
session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "Password"
session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = "Language"
Session.findById("wnd[0]").sendVKey 0
End Sub
When the macro runs there is this error
Can you help me?
Thank you,
ax_salerno





