小编Tom*_*omz的帖子

使用转义按钮关闭userform

我有两个问题.

  1. 当我按下esc按钮然后关闭Userform1

  2. 当我输入open的TextBox1则Userform2应该显示.还清楚TextBox1的Userform1自动.

我试过以下代码:

Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
    If textbox1.value = "open" then
        userform2.show
        textbox1.value =""
    End If
End Sub
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba

8
推荐指数
2
解决办法
3万
查看次数

标签 统计

excel ×1

excel-vba ×1

vba ×1