This Is the code i am using.
Private Sub QServiceOrder_Click()
Dim SAP As Object
Dim conn As Object
Dim LogonControl
Dim funcControl
Dim TableFactoryCtrl
Dim RFC_READ_TABLE
Dim eQUERY_TAB
Dim tblOptions
Dim tblData
Dim tblFields
Dim retcd
Dim strExport1
Dim strExport2
Dim intRow As Integer
Dim StrMaterial As String
Dim objFileSystemObject As Object
Dim filOutput As Object
Set LogonControl = VBA.CreateObject("SAP.LogonControl.1")
Set funcControl = VBA.CreateObject("SAP.Functions")
Set conn = LogonControl.NewConnection
conn.System = "ENP"
conn.Client = "009"
conn.User = "USER"
conn.Password = "PASS"
conn.Language = "EN"
retcd = conn.LogOn(0, False)
Select Case retcd
Case False
VBA.MsgBox "Cannot Log On!", vbInformation + vbOKOnly, "Logon Failed"
Set LogonControl = Nothing
Set funControl = Nothing
Set conn = Nothing
Exit Sub
Case True
funcControl.Connection = conn[/INDENT]
The Logon form appears but nothing happens after. How Can I show SAP and search for a Order in a transaction for exemple?
Thank you