Pesos y Dolares
Pesos y Dolares
Pesos y Dolares
Cantidad = Trim(CStr(Cantidad))
origNumLen = Len(Cantidad)
origNum = Cantidad
'Especificar el separador de miles y/o decimales
Sep = "."
'Especificar el tipo de moneda PESOS (default)
Moneda = " "
Count = 1
Do While Cantidad <> ""
Temp = GetHundreds(Right(Cantidad, 3))
If Temp <> "" Then
If Temp = "UN" And Count > 2 Then
Pesotes = Temp & Left(place(Count), Len(place(Count)) - 3) _
& " " & Pesotes
Else
Pesotes = Temp & place(Count) & Pesotes
End If
End If
If Len(Cantidad) > 3 Then
Cantidad = Left(Cantidad, Len(Cantidad) - 3)
Else
Cantidad = ""
End If
Count = Count + 1
Loop
Case Else
If origNumLen > 6 And (origNum Mod 1000000) = 0 Then
Pesotes = " " & Pesotes & " " & "DE " & Moneda
Else
Pesotes = " " & Pesotes & " " & Moneda
End If
End Select
Cantidad = Trim(CStr(Cantidad))
origNumLen = Len(Cantidad)
origNum = Cantidad
'Especificar el separador de miles y/o decimales
Sep = "."
'Especificar el tipo de moneda PESOS (default)
Moneda = " "
Count = 1
Do While Cantidad <> ""
Temp = GetHundreds(Right(Cantidad, 3))
If Temp <> "" Then
If Temp = "UN" And Count > 2 Then
Pesotes = Temp & Left(place(Count), Len(place(Count)) - 3) _
& " " & Pesotes
Else
Pesotes = Temp & place(Count) & Pesotes
End If
End If
If Len(Cantidad) > 3 Then
Cantidad = Left(Cantidad, Len(Cantidad) - 3)
Else
Cantidad = ""
End If
Count = Count + 1
Loop
Case Else
If origNumLen > 6 And (origNum Mod 1000000) = 0 Then
Pesotes = " " & Pesotes & " " & "DE " & Moneda
Else
Pesotes = " " & Pesotes & " " & Moneda
End If
End Select
Case 2
Result = "DOSCIENTOS "
Case 3
Result = "TRESCIENTOS "
Case 4
Result = "CUATROCIENTOS "
Case 5
Result = "QUINIENTOS "
Case 6
Result = "SEISCIENTOS "
Case 7
Result = "SETECIENTOS "
Case 8
Result = "OCHOCIENTOS "
Case 9
Result = "NOVECIENTOS "
End Select
End If
End If
' Convert the tens and ones place.
If Mid(Cantidad, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(Cantidad, 2))
Else
Result = Result & GetDigit(Mid(Cantidad, 3))
End If
GetHundreds = Result
End Function
Result = ""
If Val(Left(TensText, 1)) = 1 Then
Select Case Val(TensText)
Case 10: Result = "DIEZ"
Case 11: Result = "ONCE"
Case 12: Result = "DOCE"
Case 13: Result = "TRECE"
Case 14: Result = "CATORCE"
Case 15: Result = "QUINCE"
Case 16: Result = "DIECISEIS"
Case 17: Result = "DIECISIETE"
Case 18: Result = "DIECIOCHO"
Case 19: Result = "DIECINUEVE"
Case Else
End Select
Else
If Val(Right(TensText, 1)) = 0 Then
Select Case Val(Left(TensText, 1))
Case 2: Result = "VEINTE"
Case 3: Result = "TREINTA"
Case 4: Result = "CUARENTA"
Case 5: Result = "CINCUENTA"
Case 6: Result = "SESENTA"
Case 7: Result = "SETENTA"
Case 8: Result = "OCHENTA"
Case 9: Result = "NOVENTA"
Case Else
End Select
Else
Select Case Val(Left(TensText, 1))
Case 2: Result = "VEINTI"
Case 3: Result = "TREINTA Y "
Case 4: Result = "CUARENTA Y "
Case 5: Result = "CINCUENTA Y "
Case 6: Result = "SESENTA Y "
Case 7: Result = "SETENTA Y "
Case 8: Result = "OCHENTA Y "
Case 9: Result = "NOVENTA Y "
Case Else
End Select
End If