ini mungkin bisa membantu (revisi dari mas Purwedi)
karena fungsi mas Pur sebelumnya menghasilkan karakter yg tidak diinginkan
( kalo kita tracing dari 0 s/d 702)

Public Function NumToCase(ByVal iNum As Long) As String
    Dim dRemainder As Double, sResult As String
    Const LEN_CHAR = 27
 
   If iNum <= 0 Then NumToCase = "not available": Exit Function
    
    Do
    dRemainder = iNum - (LEN_CHAR * Int((iNum / LEN_CHAR)))
       If dRemainder = 0 Then
       iNum = iNum + 1
       dRemainder = dRemainder + 1
       sResult = Chr(dRemainder + 64) & sResult
       Else
        sResult = Chr(dRemainder + 64) & sResult
       End If
    iNum = Int(iNum / LEN_CHAR)
    Loop While (iNum > 0)

    NumToCase = sResult
    
End Function

sub trace() 'tambahkan listbox di form
    for i=0 to 702
       list1.additem i & "= " & NumToCase(i)
    next
end sub

pertanyaannya 702 bukan "ZZ"
dapet angka 702 darimana mas???

IpinZ


----- Original Message ----- 
From: "Jenar Suseno" <[EMAIL PROTECTED]>

>' aku udah coba bikin seperti ini
> ' ini bisa sampai ribuan, tapi hasilnya rusak pada
> angka 
> ' kelipatan 26 , 702 harusnya ZZ jadinya AAZZ 
> ' dan untuk puluhan ribu juga belum bisa
> ' Ada perbaikan dari temen-temen?
> 
> Private Sub Command1_Click()
>     Text2.Text = rubah(Text1.Text)
> End Sub
> 
> Public Function rubah(x As Integer) As String
>    Dim y As Integer, z As Integer, h As String, i As
> String
> 
>    h = ""



------------------------ Yahoo! Groups Sponsor --------------------~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/k7folB/TM
--------------------------------------------------------------------~-> 

Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Programmer-VB/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke