- ©«¤l
- 39
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 69
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- office 2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ·s¥_¥«
- µù¥U®É¶¡
- 2018-11-23
- ³Ì«áµn¿ý
- 2020-2-26
|
¦^´_ 2# Hsieh
»~·|§Úªº·N«ä¤F ÁÂÁ ¤w¥Î³oÓ¤èªk¸Ñ¨M
Private Sub CommandButton1_Click()
If TextBox1.Value = "" Or Cells(1, 1) = "" Then Exit Sub
If IsNumeric(Cells(1, 1)) Then
For i = 2 To TextBox1.Value
Cells(i, 1) = Cells(i - 1, 1) + 1
Next
Else
Set reg = CreateObject("vbscript.regexp")
With reg
.Global = True
.Pattern = "[0-9]"
For Each Match In .Execute(Cells(1, 1))
numb = numb & Match
Next
End With
eng = Left(Cells(1, 1), Len(Cells(1, 1)) - Len(numb))
For i = 2 To TextBox1.Value
Cells(i, 1) = eng & (numb + i - 1)
Next
'[a1].AutoFill Destination:=Range("a1:a" & TextBox1.Value + 1), Type:=xlfillserise
End If
End Sub
Private Sub CommandButton2_Click()
Columns(1).ClearContents
End Sub |
|