I have an ActiveX Command Button and Textbox embeded into a spreadsheet. I cannot figure out how to make the "Enter Key" work. I don't want to only be able to click the CB with the mouse. How do I make this work? Either activating the "Enter Key" with the Textbox or the Command Button. The Command Button is where the simple program is located.
Hello mscook,
Welcome to the Forum!
Are you saying that you want the focus to shift from the worksheet to the CommandButton when you press enter?
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Maybe like this?
Private Sub CommandButton1_Click() MsgBox "Click" End Sub Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) CommandButton1_Click End Sub
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks