A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Use the Private Sub TextBox2_Enter()
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I would like to execute some VBA code on clicking the cursor into a textbox on a userform.
I know it is possible to do when there is a change in a textbox as in Private Sub TextBox2_Change()but this requires a keystroke within the textbox.
If possible, I want to avoid the need for a key stroke and activate the vba code purely on a mouse click into the text box.
I would really appreciate any help to achieve this or confirmation that it is not possible.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Use the Private Sub TextBox2_Enter()
Brilliant. Many thanks for your help. Really appreciate it.
Try using an Enter() procedure:
Private Sub TextBox2_Enter()