- 帖子
- 258
- 主題
- 77
- 精華
- 0
- 積分
- 385
- 點名
- 0
- 作業系統
- Win7
- 軟體版本
- Office2010
- 閱讀權限
- 20
- 性別
- 男
- 來自
- Taiwan
- 註冊時間
- 2010-8-8
- 最後登錄
- 2021-1-25
|
回復 2# GBKEE
再請教GBKEE版大
這是自訂表單 已密碼控制流程
Private Sub CommandButton1_Click()
If Label1.Caption = "" Or Label1.Caption = "0" Then
Unload Me
Exit Sub
End If
If Label1.Caption = "510510" Then
Sheets("首頁").Cells(5, 12) = Label1.Caption
Unload Me
Else
TextBox1 = ""
TextBox1.SetFocus
End If
End Sub
Private Sub TextBox1_Change()
If TextBox1 = "" Then
Label1.Caption = TextBox1
Exit Sub
End If
If Right(TextBox1, 1) <> "*" Then
Label1.Caption = Label1.Caption & Right(TextBox1, 1)
End If
an = Len(TextBox1)
TextBox1 = String(an, "*")
End Sub
請教版大:
我的CommandButton1.caption 是"確定"
當TextBox1輸入了密碼好了 按 "確定"鍵 即可
個人想不移動滑鼠 直接按 keyboard上"Enter"鍵 即可觸發 CommandButton1_Click
應如何下語法 |
|