<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Spell number in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441842#M7484</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;so this is not the point (to convert only a number).&lt;/P&gt;&lt;P&gt;I really need the&amp;nbsp;full script to convert any number he finds as it is happening in excel,&lt;/P&gt;&lt;P&gt;Look, the atached image represents my userform, when i click "Área e perimetro" he asks me to select a polyline and after he gives this result in the first textbox so the second textbox&amp;nbsp; has to spell the number from the first one, so, there is where i find this errors.&lt;/P&gt;&lt;P&gt;So what i need is to see the script be able to spell normally any number as it is happening in access, i only right anymumber in a cell and it spells that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="get area.JPG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/410179i677D46F00CBDD576/image-size/large?v=v2&amp;amp;px=999" role="button" title="get area.JPG" alt="get area.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Oct 2017 10:56:17 GMT</pubDate>
    <dc:creator>ramd401</dc:creator>
    <dc:date>2017-10-07T10:56:17Z</dc:date>
    <item>
      <title>Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7440333#M7476</link>
      <description>&lt;P&gt;Hi, i would like some help here,&lt;/P&gt;&lt;P&gt;i have rearranged the code below so as to spellnumber but the result doesnot&amp;nbsp;in AutoCAD&lt;/P&gt;&lt;P&gt;The problem is, in excel it works normally as you can see in the image attached but in AutoCAD he gives me error Run-time error 5: Invalid procedure.&lt;/P&gt;&lt;P&gt;down first is the working image in microsoft excel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="spell.JPG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/409980i8A14728A219686C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="spell.JPG" alt="spell.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i leave the code, (He spells the numbers in portuguese) so an error is occuring as i have mentioned before&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Function ConverterParaExtenso7(NumeroParaConverter As String) As String&lt;BR /&gt;Dim sExtensoFinal As String, sExtensoAtual As String&lt;BR /&gt;Dim i As Integer&lt;BR /&gt;Dim iQtdGrupos As Integer&lt;BR /&gt;Dim sDecimais As String&lt;BR /&gt;Dim sMoedaSing As String, sMoedaPlu As String, sCentavos As String&lt;BR /&gt;Dim bSufMoeda As Boolean&lt;/P&gt;&lt;P&gt;'Separa os Decimais&lt;BR /&gt;If InStr(1, NumeroParaConverter, ",") &amp;gt; 0 Then&lt;BR /&gt;sDecimais = Right(NumeroParaConverter, Len(NumeroParaConverter) - InStr(1, NumeroParaConverter, ","))&lt;BR /&gt;NumeroParaConverter = Mid(NumeroParaConverter, 1, InStr(1, NumeroParaConverter, ",") - 1)&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;'Obtém a separação de milhares&lt;BR /&gt;iQtdGrupos = Fix(Len(NumeroParaConverter) / 3)&lt;BR /&gt;If Len(NumeroParaConverter) Mod 3 &amp;gt; 0 Then&lt;BR /&gt;iQtdGrupos = iQtdGrupos + 1&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;'Chama as funções para escrever o número&lt;BR /&gt;If iQtdGrupos &amp;gt; 2 Then bSufMoeda = True&lt;/P&gt;&lt;P&gt;For i = iQtdGrupos To 1 Step -1&lt;BR /&gt;sExtensoAtual = DesmembraValor(NumeroParaConverter, i)&lt;BR /&gt;If i = 1 Then&lt;BR /&gt;If sExtensoAtual = "" Then&lt;BR /&gt;sExtensoFinal = sExtensoFinal &amp;amp; sExtensoAtual&lt;BR /&gt;Else&lt;BR /&gt;If sExtensoFinal = "" Then&lt;BR /&gt;sExtensoFinal = sExtensoFinal &amp;amp; sExtensoAtual&lt;BR /&gt;Else&lt;BR /&gt;sExtensoFinal = sExtensoFinal &amp;amp; " " &amp;amp; sExtensoAtual&lt;BR /&gt;End If&lt;BR /&gt;End If&lt;BR /&gt;Else&lt;BR /&gt;sExtensoFinal = sExtensoFinal &amp;amp; sExtensoAtual&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;If iQtdGrupos &amp;gt; 2 Then&lt;BR /&gt;Select Case i&lt;BR /&gt;Case 1, 2&lt;BR /&gt;If sExtensoAtual &amp;lt;&amp;gt; "" Then&lt;BR /&gt;bSufMoeda = False&lt;BR /&gt;End If&lt;BR /&gt;End Select&lt;BR /&gt;End If&lt;BR /&gt;Next i&lt;/P&gt;&lt;P&gt;'Define a moeda&lt;BR /&gt;sMoedaPlu = ""&lt;BR /&gt;sMoedaSing = ""&lt;/P&gt;&lt;P&gt;If bSufMoeda = True Then sMoedaPlu = " de "&lt;/P&gt;&lt;P&gt;'Escreve os Centavos&lt;BR /&gt;sCentavos = EscreveCentavos(sDecimais)&lt;/P&gt;&lt;P&gt;'Adiciona a moeda e os centavos&lt;BR /&gt;sExtensoFinal = IIf((sExtensoFinal = ""), "", sExtensoFinal &amp;amp; IIf((sExtensoFinal = "um"), sMoedaSing, sMoedaPlu)) _&lt;BR /&gt;&amp;amp; IIf((sExtensoFinal = ""), sCentavos, IIf((sCentavos = ""), "", " virgula " &amp;amp; sCentavos))&lt;/P&gt;&lt;P&gt;'retorna o resultado&lt;BR /&gt;ConverterParaExtenso7 = sExtensoFinal&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;Private Function DesmembraValor(sValor As String, iGrupoDiv As Integer) As String&lt;BR /&gt;Dim iValor As Integer&lt;BR /&gt;Dim sExtenso As String&lt;BR /&gt;Dim iDivResto As Integer&lt;BR /&gt;Dim iDivInteiro As Integer&lt;BR /&gt;Dim iPosInicMid As Integer&lt;BR /&gt;Dim iTamMid As Integer&lt;BR /&gt;Dim sComplemento As String&lt;BR /&gt;Dim vArrDez1 As Variant&lt;BR /&gt;Dim vArrDez2 As Variant&lt;BR /&gt;Dim vArrCentena As Variant&lt;/P&gt;&lt;P&gt;vArrDez1 = Array("", "um", "dois", "três", "quatro", "cinco", "seis", "sete", "oito", "nove", _&lt;BR /&gt;"dez", "onze", "doze", "treze", "quatorze", "quinze", "dezesseis", "dezessete", _&lt;BR /&gt;"dezoito", "dezenove")&lt;/P&gt;&lt;P&gt;vArrDez2 = Array("vinte", "trinta", "quarenta", "cinquenta", "sessenta", _&lt;BR /&gt;"setenta", "oitenta", "noventa")&lt;/P&gt;&lt;P&gt;vArrCentena = Array("cem", "cento", "duzentos", "trezentos", "quatrocentos", _&lt;BR /&gt;"quinhentos", "seiscentos", "setecentos", "oitocentos", "novecentos")&lt;/P&gt;&lt;P&gt;'Pega o Valor a ser escrito e desmembra para o grupo numérico correto&lt;BR /&gt;iPosInicMid = Len(sValor) - ((3 * iGrupoDiv) - 1)&lt;BR /&gt;If iPosInicMid &amp;lt;= 1 Then&lt;BR /&gt;iTamMid = 2 + iPosInicMid&lt;BR /&gt;Else&lt;BR /&gt;iTamMid = 3&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;If iPosInicMid &amp;lt; 1 Then iPosInicMid = 1&lt;/P&gt;&lt;P&gt;iValor = CInt(Mid(sValor, iPosInicMid, iTamMid))&lt;/P&gt;&lt;P&gt;Select Case iGrupoDiv&lt;BR /&gt;Case 2&lt;BR /&gt;sComplemento = " mil"&lt;BR /&gt;Case 3&lt;BR /&gt;If iValor = 1 Then&lt;BR /&gt;sComplemento = " milhão"&lt;BR /&gt;Else&lt;BR /&gt;sComplemento = " milhões"&lt;BR /&gt;End If&lt;BR /&gt;Case 4&lt;BR /&gt;If iValor = 1 Then&lt;BR /&gt;sComplemento = " bilhão"&lt;BR /&gt;Else&lt;BR /&gt;sComplemento = " bilhões"&lt;BR /&gt;End If&lt;BR /&gt;Case 5&lt;BR /&gt;If iValor = 1 Then&lt;BR /&gt;sComplemento = " trilhão"&lt;BR /&gt;Else&lt;BR /&gt;sComplemento = " trilhões"&lt;BR /&gt;End If&lt;BR /&gt;End Select&lt;/P&gt;&lt;P&gt;Select Case iValor&lt;BR /&gt;Case 0 To 19&lt;BR /&gt;sExtenso = vArrDez1(iValor)&lt;BR /&gt;Case 20 To 99&lt;BR /&gt;iDivInteiro = Fix(iValor / 10)&lt;BR /&gt;iDivResto = iValor Mod 10&lt;/P&gt;&lt;P&gt;If iDivResto = 0 Then&lt;BR /&gt;sExtenso = vArrDez2(iDivInteiro - 2)&lt;BR /&gt;Else&lt;BR /&gt;sExtenso = vArrDez2(iDivInteiro - 2) &amp;amp; " e " &amp;amp; vArrDez1(iDivResto)&lt;BR /&gt;End If&lt;BR /&gt;Case 100 To 999&lt;BR /&gt;iDivInteiro = Fix(iValor / 100)&lt;BR /&gt;iDivResto = iValor Mod 100&lt;/P&gt;&lt;P&gt;If iDivResto = 0 Then&lt;BR /&gt;If iDivInteiro = 1 Then&lt;BR /&gt;sExtenso = vArrCentena(0) 'Cem&lt;BR /&gt;Else&lt;BR /&gt;sExtenso = vArrCentena(iDivInteiro) 'inteiro maior que 100&lt;BR /&gt;End If&lt;BR /&gt;Else&lt;BR /&gt;sExtenso = vArrCentena(iDivInteiro) &amp;amp; " e "&lt;BR /&gt;Select Case iDivResto&lt;BR /&gt;Case 0 To 19&lt;BR /&gt;sExtenso = sExtenso &amp;amp; vArrDez1(iDivResto)&lt;BR /&gt;Case 20 To 99&lt;BR /&gt;iDivInteiro2 = Fix(iDivResto / 10)&lt;BR /&gt;iDivResto2 = iDivResto Mod 10&lt;/P&gt;&lt;P&gt;If iDivResto2 = 0 Then&lt;BR /&gt;sExtenso = sExtenso &amp;amp; vArrDez2(iDivInteiro2 - 2)&lt;BR /&gt;Else&lt;BR /&gt;sExtenso = sExtenso &amp;amp; vArrDez2(iDivInteiro2 - 2) &amp;amp; " e " &amp;amp; vArrDez1(iDivResto2)&lt;BR /&gt;End If&lt;BR /&gt;End Select&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;End Select&lt;/P&gt;&lt;P&gt;DesmembraValor = sExtenso &amp;amp; IIf(iValor &amp;gt; 0, sComplemento, "")&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;Private Function EscreveCentavos(sCent As String) As String&lt;BR /&gt;Dim sExtenso As String&lt;BR /&gt;Dim iDivResto As Integer&lt;BR /&gt;Dim iDivInteiro As Integer&lt;BR /&gt;Dim sComplemento As String&lt;BR /&gt;Dim vArrDez1 As Variant&lt;BR /&gt;Dim vArrDez2 As Variant&lt;BR /&gt;Dim iCent As Integer&lt;/P&gt;&lt;P&gt;vArrDez1 = Array("", "um", "dois", "três", "quatro", "cinco", "seis", "sete", "oito", "nove", _&lt;BR /&gt;"dez", "onze", "doze", "treze", "quatorze", "quinze", "dezesseis", "dezessete", _&lt;BR /&gt;"dezoito", "dezenove")&lt;/P&gt;&lt;P&gt;vArrDez2 = Array("vinte", "trinta", "quarenta", "cinquenta", "sessenta", _&lt;BR /&gt;"setenta", "oitenta", "noventa")&lt;/P&gt;&lt;P&gt;'Adequando para duas casas decimais&lt;BR /&gt;iCent = Fix(sCent &amp;amp; String(2 - Len(sCent), "0"))&lt;/P&gt;&lt;P&gt;'Escrevendo Singular ou plural&lt;BR /&gt;If iCent = 1 Then&lt;BR /&gt;sComplemento = ""&lt;BR /&gt;Else&lt;BR /&gt;sComplemento = ""&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;'Calculando os valores&lt;BR /&gt;Select Case iCent&lt;BR /&gt;Case 0 To 19&lt;BR /&gt;sExtenso = vArrDez1(iCent)&lt;BR /&gt;Case 20 To 99&lt;BR /&gt;iDivInteiro = Fix(iCent / 10)&lt;BR /&gt;iDivResto = iCent Mod 10&lt;/P&gt;&lt;P&gt;If iDivResto = 0 Then&lt;BR /&gt;sExtenso = vArrDez2(iDivInteiro - 2)&lt;BR /&gt;Else&lt;BR /&gt;sExtenso = vArrDez2(iDivInteiro - 2) &amp;amp; " e " &amp;amp; vArrDez1(iDivResto)&lt;BR /&gt;End If&lt;BR /&gt;End Select&lt;/P&gt;&lt;P&gt;EscreveCentavos = IIf(iCent &amp;gt; 0, sExtenso &amp;amp; sComplemento, "")&lt;BR /&gt;End Function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rosario Dilo&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 15:22:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7440333#M7476</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-06T15:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7440836#M7477</link>
      <description>&lt;P&gt;what line of your code is throwing that error? (click "Debug" button in the error dialog box to see that highlighted), and with which input string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the meanwhile you could check for what decimal separator convention is adopted in your AutoCAD VBA&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 18:28:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7440836#M7477</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-06T18:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441647#M7478</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;iam receaving errors in these two lines showed in the attached images&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="first error.JPG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/410152i6CA2A4F5486B7D96/image-size/large?v=v2&amp;amp;px=999" role="button" title="first error.JPG" alt="first error.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="second error.JPG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/410153i2E2242F486868D32/image-size/large?v=v2&amp;amp;px=999" role="button" title="second error.JPG" alt="second error.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rosario Dilo&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 06:55:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441647#M7478</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-07T06:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441660#M7479</link>
      <description>&lt;P&gt;please answer all questions in proper detail&lt;/P&gt;
&lt;P&gt;1) with reference to your last post first screenshot: what error is throwing and with what input string?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2) with reference to your last post second screenshot: what input string lead to the error?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3) have you made your mind up about decimal separator?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;you could place a break point at&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;If InStr(1, NumeroParaConverter, ",") &amp;gt; 0 Then&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;then, when hitting that break point&amp;nbsp;query immediate window with&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;?NumeroParaConverter, CDbl(NumeroParaConverter)&lt;/PRE&gt;
&lt;P&gt;and see if both returned values fit your expectations&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 07:28:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441660#M7479</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-07T07:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441686#M7480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 ) with the reference of last post, first screnshot the error is (Run-time error `5` , Invalid procedure call or argument)&lt;/P&gt;&lt;P&gt;2 ) secong screnshot the string error is (sDecimais) if i omite this lines it works but can not give the the decimal spelling&lt;/P&gt;&lt;P&gt;3 ) can you indicate me in wich line i can put the break point and how? cause i had not made my mind up decimal separator&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 07:58:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441686#M7480</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-07T07:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441718#M7481</link>
      <description>&lt;P&gt;what is the number you wanted to spell and passed as "NumeroParaConverter" argument to&amp;nbsp;ConverterParaExtenso7() function?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 08:28:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441718#M7481</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-07T08:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441785#M7482</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;@Anonymous&amp;nbsp;i would like you to test the script and see exactly the errors and corect that, you can after teste this number&amp;nbsp;&lt;SPAN&gt;3.456,24&amp;nbsp; so the spelling in portuguese is: três mil quatrocentos e cinquenta e seis virgula vinte e quatro.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rosario Dilo&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 09:37:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441785#M7482</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-07T09:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441815#M7483</link>
      <description>&lt;P&gt;running the following sub:&lt;/P&gt;
&lt;PRE&gt;Sub main()
    Debug.Print ConverterParaExtenso7("3.456,24")
End Sub&lt;/PRE&gt;
&lt;P&gt;it returns&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;três mil quatrocentos e cinquenta e seis virgula vinte e quatro &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;with no error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the same happens with:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Debug.Print ConverterParaExtenso7("3456,24")&lt;/PRE&gt;
&lt;P&gt;while if I try:&lt;/P&gt;
&lt;PRE&gt;Debug.Print ConverterParaExtenso7("3456.24")&lt;/PRE&gt;
&lt;P&gt;it throws a "Run-time error '13': Type mismatch" error at code line&lt;/P&gt;
&lt;PRE&gt;iValor = CInt(Mid(sValor, iPosInicMid, iTamMid))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 10:08:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441815#M7483</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-07T10:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441842#M7484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;so this is not the point (to convert only a number).&lt;/P&gt;&lt;P&gt;I really need the&amp;nbsp;full script to convert any number he finds as it is happening in excel,&lt;/P&gt;&lt;P&gt;Look, the atached image represents my userform, when i click "Área e perimetro" he asks me to select a polyline and after he gives this result in the first textbox so the second textbox&amp;nbsp; has to spell the number from the first one, so, there is where i find this errors.&lt;/P&gt;&lt;P&gt;So what i need is to see the script be able to spell normally any number as it is happening in access, i only right anymumber in a cell and it spells that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="get area.JPG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/410179i677D46F00CBDD576/image-size/large?v=v2&amp;amp;px=999" role="button" title="get area.JPG" alt="get area.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 10:56:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7441842#M7484</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-07T10:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7442609#M7485</link>
      <description>Well, your first post was about some error in the attached code&lt;BR /&gt;And I told you your code was running correctly as long as decimal points are properly input&lt;BR /&gt;&lt;BR /&gt;Now you are talking about some "full script" and a Userform&lt;BR /&gt;&lt;BR /&gt;So:&lt;BR /&gt;- is the original issue of this thread ("error Run-time error 5: Invalid procedure") solved?&lt;BR /&gt;If so, please mark my answer as the solution ans open a new thread to face any new issue (like any Userfom one) toghether with all the code needed&lt;BR /&gt;&lt;BR /&gt;If not (your attached code is still throwing error in the way of spelling a number) post the very conditions under which it does so, showing the code that is calling ConverterParaExtenso7() as well (and some effort on your part, too ...)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 08 Oct 2017 06:19:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7442609#M7485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-08T06:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7442615#M7486</link>
      <description>&lt;P&gt;Hi @Anonymous&amp;nbsp;as i have told, the problem are the lines i have mentioned, if i clean them it spells but without the decimals, iam not so expert yet in vba, i have already done many modifications but did not work so, i woul like an ideia like, replace the line x by this and that, iam still continuing also see what to correct.&lt;/P&gt;&lt;P&gt;Rosário Dilo - regards&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2017 06:32:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7442615#M7486</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-08T06:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7442711#M7487</link>
      <description>I cannot but repeat myself&lt;BR /&gt;&lt;BR /&gt;"If not (your attached code is still throwing error in the way of spelling a number) post the very conditions under which it does so, showing the code that is calling ConverterParaExtenso7() as well"&lt;BR /&gt;&lt;BR /&gt;If you don't provide all what aboce I'm unable to help you further</description>
      <pubDate>Sun, 08 Oct 2017 08:55:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7442711#M7487</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-08T08:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7444017#M7488</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/P&gt;&lt;P&gt;the first textbox is textbox50 where i get the number to be converted&lt;/P&gt;&lt;P&gt;the second text box is textbox70 where i try to spell the number.&lt;/P&gt;&lt;P&gt;To send the text to be spelled in text box 70 iam using the following code in text box50:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub TextBox50_Change()&lt;BR /&gt;TextBox70.Text = ConverterParaExtenso(TextBox50.Text)&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 06:42:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7444017#M7488</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-09T06:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7444300#M7489</link>
      <description>&lt;P&gt;you make it hard to help you&lt;/P&gt;
&lt;P&gt;I'm nearly begging you for a real and complete example that throws&amp;nbsp;that error and you're giving details bit after bit&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;anyhow, taking the "daily bit" into account I cannot but remind you to make your mind up about the decimal separator issue&lt;/P&gt;
&lt;P&gt;so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- what's the &lt;EM&gt;actual&amp;nbsp;&lt;/EM&gt;TextBox50.Text&amp;nbsp;string that's &lt;/SPAN&gt;&lt;SPAN&gt;being passed to ConverterParaExtenso() sub?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;EM&gt;may be&lt;/EM&gt; it has some dot (".") separator that isn't recognized as such by your&amp;nbsp;ConverterParaExtenso() sub&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; in this case you may want to treat that string before passing to&amp;nbsp;your sub, like for instance:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;TextBox70.Text = ConverterParaExtenso(Replace(TextBox50.Text,".",",") '&amp;lt;--| substitute the "dot" decimal separator with a "comma" one&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- how many decimal is your ConverterParaExtenso() sub able to handle?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;EM&gt;may be&lt;/EM&gt; it's able to handle up to two decimals&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; in this case you may want to enhance the treatment of the string to pass to your sub, like for instance:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;TextBox70.Text = ConverterParaExtenso(round(Replace(TextBox50.Text,".",",") ,2)) '&amp;lt;--| round to two decimals&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I'm quite sure that if you play a little bit&amp;nbsp;with what above, with some small "trial and error" activity you&amp;nbsp;should come to the solution&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 08:57:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7444300#M7489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-09T08:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Spell number</title>
      <link>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7445299#M7490</link>
      <description>&lt;P&gt;Now i have got it like this and it works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Private Sub TextBox50_Exit(ByVal Cancel As MSForms.ReturnBoolean)&lt;BR /&gt;TextBox70.Text = ConverterParaExtenso(TextBox50.Text)&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for all&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 15:16:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/spell-number/m-p/7445299#M7490</guid>
      <dc:creator>ramd401</dc:creator>
      <dc:date>2017-10-09T15:16:22Z</dc:date>
    </item>
  </channel>
</rss>

