I am trying to make a macro in excel that will log me on to SAP, the code I have gives me a popup window confirming my information however when I submit the form it does not take me to a new SAP window.
(我正在尝试在excel中创建一个宏,该宏将使我登录到SAP,我得到的代码为我提供了一个弹出窗口,用于确认我的信息,但是,当我提交表单时,它不会带我到新的SAP窗口。)
Is there extra code I am missing or did i type something wrong?
(我是否缺少其他代码,或者输入的内容有误?)
Additionally is there a way to automate all the popup boxes asking for confirmation on my information, as I want this code eventually to run at certain times of the day, and I might not be available to input any data.(此外,还有一种方法可以使所有弹出框自动化,以要求对我的信息进行确认,因为我希望此代码最终在一天的某些时间运行,并且可能无法输入任何数据。)
Sub login1()
Dim sap As Object
Dim conn As Object
Set sap = CreateObject("SAP.Functions")
Set conn = sap.Connection
conn.System = "System Test Environment"
conn.client = "100"
conn.user = "user"
conn.Password = "password"
conn.Language = "EN"
If conn.logon(0, False) <> True Then
MsgBox "Logon to the SAP system is not possible", vbOKOnly, "Comment"
Else
End If
End Sub
ask by user3456612 translate from so