- 帖子
- 710
- 主題
- 280
- 精華
- 0
- 積分
- 1016
- 點名
- 0
- 作業系統
- Windows 10
- 軟體版本
- Office 2019
- 閱讀權限
- 50
- 性別
- 男
- 註冊時間
- 2011-6-30
- 最後登錄
- 2025-1-19
|
3#
發表於 2011-7-19 11:46
| 只看該作者
本帖最後由 av8d 於 2011-7-19 14:35 編輯
回復 2# oobird
真的非常感謝版大的熱心回應,解開了我的難題。
指定完成
Private Sub Workbook_Open()
Application.OnKey "^q", "工作表1.CommandButton1_Click"
End Sub
以下使用正確無誤,但是方便性欠佳,因此我想修。
Private Sub CommandButton1_Click()
Cells(2, ActiveCell.Column + 1).Select
Dim t
With TextBox1
If Not .Visible Then
t = 1 '或InputBox("輸入限制字元數", "WLZ", 3)
If IsNumeric(t) Then LenStr = t
If t < 1 Then t = 1
.Activate
End If
.Visible = CommandButton1
End With
End Sub
方便性欠佳.rar (13.88 KB)
使用方法,點A1然後執行Private Sub CommandButton1_Click()
即可快速地填上數字,且會自動換行,方便性欠佳的部分就是,每次執行前都要按ESC,
所以我想將Call Form_KeyDown(27, 0)加入Private Sub CommandButton1_Click()
可是一放進去就會顯示錯誤,不知道還有沒有其他的方法使其更便利,我將持續上網搜尋中。 |
|