VBA如何实现按回车键输入一个指定字符

2025-03-20 09:17:06
推荐回答(1个)
回答1:

定义按钮txtA
Private Sub txtA_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
txtA.Text = txtA.Text + "A"
End If
End Sub