in the attached code bellow, I get error :

Run-time error '429':
ActiveX control can not create object

and Public function To cyrillyc is marked yellow...

Could somebody help me with this issue and and with the rest of functions because, it is more or less around the same issue i.e., conversion between Unicode and Ltin i.e., Cyrillyc character sets


Option Compare Database

Public Function getEntity(strLevel As String)
Dim rst As Recordset

Select Case strLevel
Case Is > "200"
getEntity = "FBiH"
Case Else
Set rst = CurrentDb.OpenRecordset("SELECT RegionCode FROM dbo_Municipalities " & _
"WHERE MunicipalityCode='" & strLevel & "';")
getEntity = IIf(rst![RegionCode] = "300", "RS", "FBiH")
Set rst = Nothing
End Select
End Function

Public Function ToLatinUnicode(strSource As String) As String
ToLatinUnicode = ConvertEncoding(strSource, ccCyrillic, ccLatin, ccYUSCII, ccUnicode)
End Function

Public Function ToCyrillicUnicode(strSource As String) As String

ToCyrillicUnicode = ConvertEncoding(strSource, 2, 2, 1, 3)

End Function

Public Function ToCyrilicYUSCII(strSource As String) As String
ToCyrilicYUSCII = ConvertEncoding(strSource, ccLatin, ccCyrillic, ccYUSCII, ccYUSCII)
End Function

Public Function ToLatin(strSource As String) As String
ToLatin = ConvertEncoding(strSource, ccCyrillic, ccLatin, ccUnicode, ccUnicode)
End Function

Public Function Format(strSource As String, strLatin) As String
Select Case strLatin
Case 1
Format = ToLatinUnicode(strSource)
Case Else
Format = ToCyrillicUnicode(strSource)
End Select
End Function