Ucase$ returning error

I am trying to uppercase a Variant, I have the following code

Function SDSProcedureCall (procedure As String, usesystem As String, overridesystem As String, debug As Integer, agentInfo As String, parmstring As Variant, MaxRowsFetched As Long) As Variant

Dim UpperCase as Variant

UpperCase = Ucase$(parmstring)

I am getting a “Type Mismatch” on the above line. I have also tried Ucase with the same error.

Subject: Ucase$ returning error

Well… what is the value and actual data type of parmstring?

The type mismatch error strongly suggests that parmstring is not a string.

-rich