• DavidTaber
  • 0 Points
  • Member since 2007

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2

I am attempting to use the DescribeSOBjects using the office toolkit vs. 4.0, and cannot seem to get this to work properly.


Does anyone have some good examples of how to use this method in the VBA editor?




Private Sub GetSObjects_Click()

    Dim Username As String
    Dim Password As String
    Username = "user@user.org"
    Password = "password"

    Dim sfSession As SForceSession4
    Set sfSession = New SForceSession4
    Dim dsr() As String
    If sfSession.Login(Username, Password) Then
        dsr = sfSession.DescribeSObjects( "Account")
        MsgBox "Invalid Login"
    End If

End Sub


When I run the above line I get an error saying Expected Function or Variable


Even when I change dsr = sfSession.DescribeSObjects( "Account") to


sfSession.DescribeSObjects( "Account"


I still get an error saying: Array passed to DescribeSObject needs to be of type VT_BSTR or BT_VARIANT.


Any help would be appreciated.