You need to sign in to do that
Don't have an account?
Neil Wylie
Login as a form_load event
Hi all,
I am working in VB6 and am trying to create a form_load event that will log me onto Sales Force. Is there any example code around? I have tried the code supplied in the handbook, but that fails.
Neil
Private Sub Form_Load()
If SampleLogin("Me.txtUserName", "Me.txtPassword") = True Then
MsgBox "Logged in", vbOKOnly, "SalesForce"
'CreateAccount
Else
MsgBox "Login Failed"
Exit Sub
End If
End Sub
Public Function SampleLogin(Username, Password) As Boolean
Set g_SFApi = New SForceOfficeToolkitLib3.SForceSession3
SampleLogin = g_SFApi.Login("username", "passwordwithsecuriytoken")
MsgBox g_SFApi.ErrorMessage
End Function