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

VBA §Ç¸¹¶W¹L12½X¼Æ¦r¦p¦ó¥H¼Æ¦C¤è¦¡©¹¤U¶ñº¡

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-2-17 16:46 ½s¿è

¦^´_ 1# aassddff736


    ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò

Private Sub CommandButton1_Click()
Dim T$, Q$, Brr, V&
T = Trim([A1]): V = Val(TextBox1.Value): If V = 0 Or T = "" Then Exit Sub
ReDim Brr(1 To V, 1 To 1)
Q = StrReverse(Mid(Val(StrReverse(T & "1")), 2))
T = Replace(T, Q, "")
For i = 0 To V - 1: Brr(i + 1, 1) = T & (Val(Q) + i): Next
[A1].Resize(V) = Brr
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 4# aassddff736

ÁÂÁ«e½ú¦^´_
«á¾Ç­×§ï»P¾Ç²ß¤ß±o¦p¤U,½Ð«e½ú°Ñ¦Ò
°õ¦æ«e:


°õ¦æµ²ªG:


Private Sub CommandButton1_Click()
Dim T$, Q$, Brr, V&, L%
'¡ô«Å§iÅܼÆ
T = Trim([A1]): V = Val(TextBox1.Value): If V = 0 Or T = "" Then Exit Sub
'¡ô¥OTÅܼƬO[A1]Àx¦s®æ¥h°£ÀY§À«áªº·s¦r¦ê,¥OVÅܼƬO¤å¦rµ¡¿é¤J­ÈÂà¤Æ¦¨ªº¼Æ­È
'¦pªGVÅܼƬO0 ©ÎTÅܼƬOªÅ¦r¤¸,´Nµ²§ôµ{¦¡°õ¦æ

Intersect(Me.UsedRange, [A:A]).Offset(1).ClearContents
'¡ô¥O[A2]¶}©l¥H¤UªºÀx¦s®æ²M°£¤º®e
ReDim Brr(1 To V, 1 To 1)
'¡ô«Å§iBrrÅܼƬO¤GºûªÅ°}¦C
Q = Val(StrReverse(T & "1")): Q = StrReverse(Mid(Q, 2)): L = Len(Q)
'¡ô¥OQÅܼƬO T¦r¦ê³Ì«áªº³sÄò¼Æ¦r¦ê,¥OLÅܼƬOQÅܼƪº¦r¤¸¼Æ
T = Replace(T, Q, "")
'¡ô¥OTÅܼÆÅܦ¨¦Ü´«±¼QÅܼƫ᪺·s¦r¦ê
For i = 0 To V - 1: Brr(i + 1, 1) = T & Application.Text(Val(Q) + i, String(L, "0")): Next
'¡ô³]¶¶°j°é!¥OiÅܼƱq0 ¨ìVÅܼÆ-1,±N°j°é·s¦r¦ê¼g¤JBrr°}¦C¤¤
[A1].Resize(V) = Brr
'¡ô¥O±q[A1]Àx¦s®æ¶}©l¦V¤UÂX®iVÅܼƭÓÀx¦s®æ½d³ò,¥HBrr°}¦C­È¼g¤J
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 6# aassddff736

¿ï¨úA:A
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD