+ Start a Discussion
NathanSpNathanSp 

Query Selected Rows error - Contact Type mismatch

When I try to query a selected row(s) I am getting this error:

 

Salesforce: Update()

invalid Range, missing data type, or other error, type is: Contact Type mismatch

 

Any idea what's going wrong here and how I can fix it?  Thanks!!

SeanCaesarSeanCaesar

I'm not sure if this was ever answered almost a year ago. I actually just received a similar error. After years of using the excel connector without an issue, I received Error 13 Type Mismatch. I had only received this after I had updated my options (for the api url and the reasonable limits). It actually still allowed me to query table data but not query rows or perform any updates.

 

I hit debug and noticed that in the following code line (below) was causing the issue.

Function QueryRegBool(vKey As String) As Boolean
    Dim bb: bb = QueryValue(HKEY_CURRENT_USER, SO_KEY, vKey)
    QueryRegBool = IIf(bb = "", False, bb) ' make sure we pass back a bool
End Function

 

When looking into it, I noticed that the variable bb was somehow set to "tru" not "TRUE". I fixed this simply by commenting out (adding the ') the line bb= QueryValue(HKEY_CURRENT_USER, SO_KEY, vKey) and running the macro again. It worked and resolved the issue. Afterwards, I then updated the function back to the same as it was before (as listed above).

 

Nathan, I hope that you were able to find a solution prior to this but I wanted to post this just in case any one else ever comes across the problem.