function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Can't create SForceSession4 object in VBA

I have the Salesforce Toolkit installed, and the SForceOfficeToolkitLib4 is showing up in the VBA object browser and is enabled and in the VBA Tools -> References the SForceOfficeToolkit4 v4.0 is showing and is checked.


When I run the following code to login I get a VBA error 429 ActiveX cannot create object on the CreateObject call.


I'm running Windows 7 64-bit and Office 2010 64-bit.  


Dim g_sfApi As SForceOfficeToolkitLib4.SForceSession4


Public Function SF_Login() As Long

        Set g_sfApi = CreateObject("SForceOfficeToolkitLib4.SForceSession4")
        If g_sfApi.Login("XXX", "YYY") = False Then
            MsgBox (g_sfApi.ErrorMessage)
        End If
end function


What am I missing in this setup?   Does not work with the latest release of Office 2010 or Windows 7?




I changed the Create call to:


New SForceOfficeToolkitLib4.SForceSession4


And was able to get it to login using Office 2010 32-but, but it still generates ActiveX 429 errors on the "New SForceOfficeToolkitLib4.SForceSession4" call in Office 2010 64-bit.


Does even work with Office 2010 64-bit? 




At least up to a few months ago, none of these libraries really work with 64-bit office.