You need to sign in to do that
Don't have an account?
Neil Wylie
Login
I have written an app. in VB6 with a form!load eevnt that logs into SalesForce using my account and password. This is now failing, and my internet connection is fine. Any ideas why?
Thanks
Thanks
Under form ! Load:
'Log into SalesForce
If SampleLogin(Me.txtSF_User, Me.txtSF_Password) = True Then
MsgBox "Logged in", vbOKOnly, "SalesForce"
'CreateAccount
Else
MsgBox "Login Failed"
Exit Sub
End If
The function SampleLogin looks like:
Public Function SampleLogin(Username, Password) As Boolean
Set g_SFApi = New SForceOfficeToolkitLib3.SForceSession3
SampleLogin = g_SFApi.Login("wylneil@ntlworld.com", "letmein1CkCr5V5faCYYJFnERv9eVeJoi")
End Function
The password element fater letmein1 was supplied by SF to sageguard against hackers.
if (! g_SFApi.Login("wylneil@ntlworld.com", "letmein1CkCr5V5faCYYJFnERv9eVeJoi"))
' failure message, should tell you why login failed
MsgBox g_SFApi.ErrorMessage
A connection with the server could not be established.
Interestingly, when I went looking for the error collection, when I typed "g_Sfapi.", no predictive text came up.
username = "wylneil@ntlworld.com"
password = "letmein1"
Ok, I've just done it again.
I have created a new form, with 1 command button.
Under general declarations, i have:
Dim WithEvents g_SFApi As SForceOfficeToolkitLib3.SForceSession3
On the form!load event I have entered:
MsgBox g_SFApi.ServerUrl
Error message = Object variable or with block variable not set
This time I am getting predictive text.
sorry I have to sign off now - I have a bridge match in half an hour. Speak tomorrow.
That's me back on line. Did you have any success with my login problem.
Neil