- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
2#
發表於 2018-10-15 18:41
| 只看該作者
回復 1# afu9240 - Option Explicit
- Private Sub ComboBox1_Change()
- Dim E As Range, St As String
- With 工作表1
- For Each E In .Range("a:a").SpecialCells(xlCellTypeConstants)
- If E Like ComboBox1 & "*" Then
- St = IIf(Replace(E, ComboBox1, "") > St, Replace(E, ComboBox1, ""), St)
- End If
- Next
- If St = "" Then St = 0
- End With
- TextBox1.Text = ComboBox1 & Format(St + 1, "00000")
- End Sub
複製代碼 |
|