ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm Question (https://www.excelbanter.com/excel-programming/351047-userform-question.html)

Barb Reinhardt

UserForm Question
 
I have a userform with a text box in it. I want the user to enter the month
and date in the format mm/yyyy. In the text box, I want to display mm/yyyy,
but when the user selects the TextBox1, I want it to clear out. What do I
need to do to accomplish this?

Thanks,
Barb Reinhardt

Mark Lincoln

UserForm Question
 
I haven't tested this, but it should work. I'm sure someone will tell
me if I'm wrong. :-)

Private Sub TextBox1_Enter()
TextBox1 = ""
End Sub


Toppers

UserForm Question
 
Barb,
This will clear previous entries

Private Sub TextBox1_Enter()
TextBox1.Value = ""
End Sub

"Barb Reinhardt" wrote:

I have a userform with a text box in it. I want the user to enter the month
and date in the format mm/yyyy. In the text box, I want to display mm/yyyy,
but when the user selects the TextBox1, I want it to clear out. What do I
need to do to accomplish this?

Thanks,
Barb Reinhardt



All times are GMT +1. The time now is 07:26 AM.

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