- 帖子
- 396
- 主題
- 12
- 精華
- 0
- 積分
- 425
- 點名
- 1
- 作業系統
- Win10
- 軟體版本
- Office 2016
- 閱讀權限
- 20
- 性別
- 男
- 來自
- 台中
- 註冊時間
- 2013-7-2
- 最後登錄
- 2026-8-12
  
|
6#
發表於 2015-11-4 09:48
| 只看該作者
回復 4# lichang
幫補自動排序- Private Sub CommandButton1_Click()
- Dim Col As Integer
- Col = Sheets("工作表1").[a1].End(xlToRight).Column + 1
- Cells(1, Col) = TextBox1.Value
- Cells(2, Col) = TextBox2.Value
- Cells(3, Col) = TextBox3.Value
- Range(Cells(1, 2), Cells(3, [XFD3].End(1).Column)).Select
- Selection.Sort Key1:=Range("B1"), Order1:=xlAscending
- End Sub
複製代碼 |
|