Re: uprava makra pro Excel

From: Kamil Sverak (sverak@csadbk.cz)
Date: 22. 11. 2002, 10:00 CET


kdyz bys chtel stopadesat a ctyricet hal, tak
muzes pouzit toto

>> Function CisloNaText(ByVal cislo)
>>     Dim text As String
>>     
>>     .....

> desetiny = " a " & round(cislo - Int(cislo),1)*100 &" Hal."

if destetiny <> 0 then
   des_txt = " a " & CisloNaText(desetiny) & "hal."
end if

>>     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 & des_txt


>> End Function
>>

> stacia len tie 2 riadky, neskusal som pisem to zruky, snad tam nebudu chyby
> :-))

Taky jsem to nezkousel, ale protoze jsem psal
original ;-)) tak se klidne ozvi, kdyz by to
nejelo.. opravime..


-- 
cao,
 Kamil 



This archive was generated by hypermail 2.1.2 : 22. 11. 2002, 10:01 CET