Activate active x textform pressing enter

  • Hi, I create this simple code. I have a column in Sheet1 filled with bolean operator (true/false, activated by checkboxes). The code below search for true value and if the next cell is empty it fills it with the content
    written in the active x textbox I put in Sheet2 (where there are the checkboxes) and finally it cleans the text form. In sheet2 I even put a button to which I assigned this macro (that I write in Sheet1 objects). My question is, there is a way to activate the textbox by pressing enter (Key 13 if I'm not mistaken).

    Thanks for any help! :)

  • Re: Activate active x textform pressing enter

    Activate ActiveX Textbox control by pressing Enter key from where?

    If in the worksheet, that can be done but I don't recommend it. One would have to run a macro and have it watch for key presses. This can be done in two ways. The easier method would use Application.Onkey. There should be several examples on this forum that show that method.

  • Re: Activate active x textform pressing enter

    My idea was to write what I want to put in sheet1 (in activated cells) and without pressing the button to activate the macro activate the macro by just pressing enter. So I don't need to use the mouse, I only have to write the name and push enter.

  • Re: Activate active x textform pressing enter

    Use the Worksheet_Change event to call the macro... although I'm not sure it's such a good idea to call a macro like that outside of the users' control. You might find the workbook gets a little sluggish..

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!