Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using 'enter' on a textbox to activate a command button?
i have atext box which the user types into and then a command butto
next to it to do a search based on their text. what i would like is t be able to just type the text and press enter in the text box t perform the same search. Im pretty sure it can be done quite easily a I remember doing something similar in VB a few years ago, i just can remember how -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
using 'enter' on a textbox to activate a command button?
Hi,
Private Sub txtBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) On Error Resume Next If KeyCode = 13 Then Call yourSub End Sub I would make a sub that you either call with the enter key or by the commandButton. Don't call the sub under the command button. Regards, JY "neowok " wrote in message ... i have atext box which the user types into and then a command button next to it to do a search based on their text. what i would like is to be able to just type the text and press enter in the text box to perform the same search. Im pretty sure it can be done quite easily as I remember doing something similar in VB a few years ago, i just cant remember how. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a way to make the enter button work as regular enter | Excel Discussion (Misc queries) | |||
repost: How do I activate an option button? | Excel Discussion (Misc queries) | |||
How do I activate an option button? | Excel Discussion (Misc queries) | |||
How do I activate right mouse button in Excel | Setting up and Configuration of Excel | |||
activate a worksheet formula through a button | Excel Discussion (Misc queries) |