HenryCam
5th September 2012, 20:49
Buen Dia a Todos:
Alguien me podria ayudar con el codigo para abrir una sesion de baan V atravez de codigo VBA para Excel, traté de adaptar el siguiente codigo para BaanIV pero no tuve suerte
mi version de baan es 7.1d.04.156
saludos y espero me puedan ayudar. :)
Private Sub CommandButton1_Click()
Set BaanObj = CreateObject("Baan4.Application")
BaanObj.Timeout = 10
On Error GoTo BaanAutomationError
B_function = "start.session(" & Chr(34) & "tiitm0101m000" & Chr(34) & ")"
BaanObj.ParseExecFunction "otccomdllbaan", B_function
Exit Sub
' error handling
BaanAutomationError:
MsgBox "Baan IV automation error: " & BaanObj.Error
MsgBox "Return value function: " & B_function & " " & BaanObj.ReturnValue
BaanObj.Quit
Set BaanObj = Nothing
Exit Sub
End Sub
Alguien me podria ayudar con el codigo para abrir una sesion de baan V atravez de codigo VBA para Excel, traté de adaptar el siguiente codigo para BaanIV pero no tuve suerte
mi version de baan es 7.1d.04.156
saludos y espero me puedan ayudar. :)
Private Sub CommandButton1_Click()
Set BaanObj = CreateObject("Baan4.Application")
BaanObj.Timeout = 10
On Error GoTo BaanAutomationError
B_function = "start.session(" & Chr(34) & "tiitm0101m000" & Chr(34) & ")"
BaanObj.ParseExecFunction "otccomdllbaan", B_function
Exit Sub
' error handling
BaanAutomationError:
MsgBox "Baan IV automation error: " & BaanObj.Error
MsgBox "Return value function: " & B_function & " " & BaanObj.ReturnValue
BaanObj.Quit
Set BaanObj = Nothing
Exit Sub
End Sub