Tema: Visual Basic
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/07/2004, 09:42
rsiles
 
Fecha de Ingreso: abril-2004
Ubicación: Managua
Mensajes: 150
Antigüedad: 20 años, 1 mes
Puntos: 0
Case 1, 4, 7, 10, 13
Select Case Mid(entero, b, 1)
Case "1"

If flag = "N" Then
If paso = 1 Then
expresion = expresion & "uno "
Else
expresion = expresion & "un "
End If
End If

Case "2"
If flag = "N" Then
expresion = expresion & "dos "
End If

Case "3"
If flag = "N" Then
expresion = expresion & "tres "
End If
Case "4"
If flag = "N" Then
expresion = expresion & "cuatro "
End If
Case "5"
If flag = "N" Then
expresion = expresion & "cinco "
End If
Case "6"
If flag = "N" Then
expresion = expresion & "seis "
End If
Case "7"
If flag = "N" Then
expresion = expresion & "siete "
End If
Case "8"
If flag = "N" Then
expresion = expresion & "ocho "
End If
Case "9"
If flag = "N" Then
expresion = expresion & "nueve "
End If
End Select
End Select

'************************************************* ************************

'********* MILES PARA miles
If paso = 4 And valor = "miles" Then
If Mid(entero, 6, 1) <> "0" Or Mid(entero, 5, 1) <> "0" Or Mid(entero, 4, 1) <> "0" Or _
(Mid(entero, 6, 1) = "0" And Mid(entero, 5, 1) = "0" And Mid(entero, 4, 1) = "0" And _
Len(entero) <= 6) Then
expresion = expresion & "mil "
End If
End If

'********** MILES PARA MILLONES
If paso = 4 And valor = "milion" Then

If cifra = 7 And Val(Mid(entero, 2, 3)) >= 1 Then
expresion = expresion & "mil "
End If


If cifra = 8 And Val(Mid(entero, 3, 3)) >= 1 Then
expresion = expresion & "mil "
End If

If cifra = 9 And Val(Mid(entero, 4, 3)) >= 1 Then
expresion = expresion & "mil "
End If
End If


'********** MILES PARA MILLARDOS
If paso = 4 And valor = "miliardos" Then

If cifra = 10 And Val(Mid(entero, 5, 3)) >= 1 Then
expresion = expresion & "mil "
End If


If cifra = 11 And Val(Mid(entero, 6, 3)) >= 1 Then
expresion = expresion & "mil "
End If

If cifra = 12 And Val(Mid(entero, 7, 3)) >= 1 Then
expresion = expresion & "mil "
End If
End If

'********** MILES PARA BILLONES
If paso = 4 And valor = "biliones" Then

If cifra = 13 And Val(Mid(entero, 8, 3)) >= 1 Then
expresion = expresion & "mil "
End If

If cifra = 14 And Val(Mid(entero, 9, 3)) >= 1 Then
expresion = expresion & "mil "
End If

If cifra = 15 And Val(Mid(entero, 10, 3)) >= 1 Then
expresion = expresion & "mil "
End If
End If

'**********"INICIAMOS CONDICIONES PARA USAR PALABRA MILES DE MILLONES"*****************
Select Case gOpcionMil
Case True 'Desea usar la palabra miles de millones
'Z********[SOLO PARA MILLARDOS] CUANDO MILLONES ES IGUAL A CERO
If paso = 7 And valor = "miliardos" And cifra = 10 _
And Val(Mid(entero, 2, 3)) = 0 Then
expresion = expresion & "millones "
End If


If paso = 7 And valor = "miliardos" And cifra = 11 _
And Val(Mid(entero, 3, 3)) = 0 Then
expresion = expresion & "millones "
End If


If paso = 7 And valor = "miliardos" And cifra = 12 _
And Val(Mid(entero, 4, 3)) = 0 Then
expresion = expresion & "millones "
End If
'Z*****PONER MILLARDOS DE BILLONES ******
If paso = 10 And valor = "biliones" And cifra = 13 _
And Val(Mid(entero, 2, 3)) > 0 Then
expresion = expresion & "mil "
BandBilion = True
End If

If paso = 10 And valor = "biliones" And cifra = 14 _
And Val(Mid(entero, 3, 3)) > 0 Then
expresion = expresion & "mil "
BandBilion = True
End If

If paso = 10 And valor = "biliones" And cifra = 15 _
And Val(Mid(entero, 4, 3)) > 0 Then
expresion = expresion & "mil "
BandBilion = True
End If