Returns the currency ID of a given currency.
<HsvCurrencies>.GetCurrencyID(bstrLabel)
Long. Returns the currency ID.
The following function returns the label of a currency for a given language. The currency ID obtained by GetCurrencyID is passed to GetCurrencyDescription along with the language ID obtained by HsvMetadata.EnumLanguages.
Function getCurrencyDesc(sCurr As String, sLang As String) As String Dim cCurrencies As HsvCurrencies, lCurrID As Long Dim vaLangIDs As Variant, vaLangDescs As Variant 'g_cMetadata is a previously set HsvMetadata object reference Set cCurrencies = g_cMetadata.Currencies g_cMetadata.EnumLanguages vaLangIDs, vaLangDescs For i = LBound(vaLangDescs) To UBound(vaLangDescs) If vaLangDescs(i) = sLang Then lCurrID = cCurrencies.GetCurrencyID(sCurr) getCurrencyDesc = cCurrencies.getCurrencyDescription(lCurrID, _ vaLangIDs(i)) Exit Function End If Next i End Function