ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run a procedure when exiting a a textbox within a userform (https://www.excelbanter.com/excel-programming/367241-run-procedure-when-exiting-textbox-within-userform.html)

borg

Run a procedure when exiting a a textbox within a userform
 
Hi,

I have a userform with a bunch of textboxes. Once someone types something
into userform1.textbox1 and press the tab or select another textbox, I would
like to run the code from a procedure. I know it is not textbox1_onclick
but is there something similar to this?

Thanks!

Chip Pearson

Run a procedure when exiting a a textbox within a userform
 
You can use the Exit event of the textbox:

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
' your code here
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"borg" wrote in message
...
Hi,

I have a userform with a bunch of textboxes. Once someone
types something
into userform1.textbox1 and press the tab or select another
textbox, I would
like to run the code from a procedure. I know it is not
textbox1_onclick
but is there something similar to this?

Thanks!




borg

Run a procedure when exiting a a textbox within a userform
 
Thank you so much!!!




"Chip Pearson" wrote:

You can use the Exit event of the textbox:

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
' your code here
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"borg" wrote in message
...
Hi,

I have a userform with a bunch of textboxes. Once someone
types something
into userform1.textbox1 and press the tab or select another
textbox, I would
like to run the code from a procedure. I know it is not
textbox1_onclick
but is there something similar to this?

Thanks!






All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com