ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clearing a textbox in userform (https://www.excelbanter.com/excel-programming/358917-clearing-textbox-userform.html)

excelnut1954

Clearing a textbox in userform
 
The user fills in Textbox 40 in Userform7, then clicks a CMD button to
execute a macro, which brings up UserForm11 for the user to interact
with. UF7 stays up during this, because he will need to continue with
another function within that UserForm.

So, when the user is done with UF11, UF7 is still there for him to
continue with. Is there a way for Textbox40 to be cleared when it comes
back? I can't unload, then reload it, since there will be other
textboxes in UF7 with data that will need to be processed later on.

I have this change event code for the textbox now.
Private Sub TextBox40_Change()
EditPOVal = TextBox40.Value
End Sub

I've tried putting TextBox40.Text = "" in various places,
but it doesn't react correctly.

Any suggestions?

Thanks,
J.O.


Bob Phillips[_6_]

Clearing a textbox in userform
 
In the commandbutton code, after the Userform11 show

UF11.Show
TexBox40.Text = ""

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"excelnut1954" wrote in message
oups.com...
The user fills in Textbox 40 in Userform7, then clicks a CMD button to
execute a macro, which brings up UserForm11 for the user to interact
with. UF7 stays up during this, because he will need to continue with
another function within that UserForm.

So, when the user is done with UF11, UF7 is still there for him to
continue with. Is there a way for Textbox40 to be cleared when it comes
back? I can't unload, then reload it, since there will be other
textboxes in UF7 with data that will need to be processed later on.

I have this change event code for the textbox now.
Private Sub TextBox40_Change()
EditPOVal = TextBox40.Value
End Sub

I've tried putting TextBox40.Text = "" in various places,
but it doesn't react correctly.

Any suggestions?

Thanks,
J.O.




excelnut1954

Clearing a textbox in userform
 
Thanks Bob.
I've been searching past posts off and on all day.... and as happens, I
stumbled on a solution after I posted this. Same as yours.
Works fine.

I appreaciate your quick response.

Thanks again,
J.O.



All times are GMT +1. The time now is 01:23 PM.

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