Zdar a silu Sokol, dna 21.11.2002 si napisal(a): > ---- > Option Explicit > > Function CisloNaText(ByVal cislo) > Dim text As String > > '________kontroly ________ > > If cislo > 1000000 Then > MsgBox "cislo je vetsi jak Milion" > Exit Function 'do milionu > End If desetiny = " a " & round(cislo - Int(cislo),1)*100 &" Hal." > cislo = Int(cislo) 'Zaokrouhli cislo > '_________________________ > > If cislo >= 1000 And cislo < 5000 Then > text = retezec(Int(cislo / 1000) * 1000) > cislo = cislo - Int(cislo / 1000) * 1000 > ElseIf cislo >= 5000 Then > text = TriCisla(Left(Trim(Str(cislo)), Len(Trim(Str(cislo))) - 3)) & "tisíc" > cislo = cislo - Val(Left(Trim(Str(cislo)), Len(Trim(Str(cislo))) - 3)) * 1000 > End If > text = text & TriCisla(cislo) CisloNaText = text & desetiny > End Function > stacia len tie 2 riadky, neskusal som pisem to zruky, snad tam nebudu chyby :-)) s pozdravom AleXXX -- Remember: there are no strangers in the world, only friends who have not yet met.
This archive was generated by hypermail 2.1.2 : 22. 11. 2002, 09:40 CET