Erreur 'Overflow' avec 'Currency' ?????
Sujet: Erreur 'Overflow' avec 'Currency' ????? De: divers_rh (l' arobase) hotmail.com (Raymond H.) Groupes: fr.comp.lang.basic
Organisation: Service de news de lacave.net
Date: 03. Apr 2007, 03:05:57
Bonsoir,
Quelqu'un pourrait-il me dire pourquoi il y a erreur 'Overflow' à la ligne
'Decimal_Base = Chr((Nombre_decimal Mod 256) + 1) & Decimal_Base' ? Ce code
convertis un nombre décimal (base 10) en caractère (base 256).
Raymond
Private Sub Command1_Click()
Dim nb_decimal As Currency
nb_decimal = 199144102410#
Dim nb_base As String
nb_base = Decimal_Base(nb_decimal)
End Sub
Public Function Decimal_Base(Nombre_decimal As Currency) As String
'Decimale --> Base 256 Convertisseur
Do
Decimal_Base = Chr((Nombre_decimal Mod 256) + 1) & Decimal_Base
Nombre_decimal = Nombre_decimal \ 256
Loop Until Nombre_decimal = 0
End Function
|
|