ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] office 2010 vbaÂà¨ìoffice2000ªº°ÝÃD

[µo°Ý] office 2010 vbaÂà¨ìoffice2000ªº°ÝÃD

¦U¦ì¤j­ô¦n
¤p§Ì³Ìªñoffice2010§@¤@­Óvb¦boffice2000°õ¦æ·|¥X¿ù¡A¥H¤U¬O§Úªº¤º®e
§Úª¾¹D¦³ª©¥»°ÝÃD¦ý¬O¦]¬°¤£ª¾¦boffice2000­n¦p¦ó³B²z¡C
Sub chkno()
'
'
Dim myrow As Long
Dim myrange As Range
Dim i As Integer
    myrow = Range("a1").End(xlDown).Row
    For i = 2 To myrow
        Set myrange = Cells(i, 4)
        If myrange.Value >= 1 Then
           Cells(i, 5).Value = _
           Cells(i, 3) & String(4 - Len(myrange), "0") & myrange
        End If
    Next
           
End Sub
lionliu

¦^´_ 5# Hsieh
ÁÂÁ¤j®a¤w¸Ñ¨M
¦ý¬O¬O¥Î²Â¤èªkOFFICE2000¶}ÀÉ«á¦A¶×¤J¼Ò²Õ
´N¥i¥H¡A©Ò¥H¤£²M·¡¯u¥¿­ì¦]¦b­þ¡C
¤£¹L¦b¦¹ÁÂÁ ¦U¦ì¤j­ô¼ö¤ßªº¦^Âгá¡C
:D :D
lionliu

TOP

¦^´_ 4# lionliu

4 - Len(myrange)
¬O§_·|¦¨¬°­t­È¡H
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


    ·PÁÂH¤j¦^ÂÐ
§Ú·Q§Úªº¿ù»~¤£¦bª©¥»°ÝÃD¡A§Ú¸ê®Æ¥¨¶°­Y³æ¿W°õ¦æ¬OOKªº¡C
¦ý¬O­Y©Ò¦³¥¨¶°¦A¤@°_·|²£¥Í§ä¤£¨ì±M®×©Îµ{¦¡®w¡C
­Y¿W¥ß¨ì¥t¤@­Ó·sÀÉ´NOK¡C
¿ù»~µo¥ÍÂI¦A STRINGS³o¨ç¼Æ¡C
¦³ÂI¤£ª¾¦p¦ó³B²z¡C
lionliu

TOP

Integer¦ü¥G·|¨Ï®Ä²vÅÜ®t¡A¤@«ß¥Îlong

TOP

¦^´_ 1# lionliu

¬O§_¥X²{·¸¦ìªº¿ù»~?
    Dim i As Long
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD