Search code examples
exceltextboxsetfocusvba

Set focus to AciveX text Box with VBA


I'd like to set-focus to a text box placed in a worksheet (not on a form) using vba, or any other method without using the mouse.

The SetFocus function is not available in that situation, unlike when the text box is placed on a user form.

The purpose is to move the cursor to the text box, so typing will type in the TB and not on the sheet. excel 2010.

Is it possible to do that?

tx


Solution

  • You need the Activate method of the textbox.