ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Form Text Box - auto delete prompt text (https://www.excelbanter.com/excel-programming/414924-user-form-text-box-auto-delete-prompt-text.html)

[email protected]

User Form Text Box - auto delete prompt text
 
Hi Guys,

I have a text box that I am using to record date of birth. I am using
the DD/MMM/YY format to avoid US / UK format confusion. I have written
the text 'DD/MMM/YY' in the text box as a prompt for the user to enter
the correct date format.

At the moment when the user clicks the Date of Birth text box they
either need to delete the 'DD/MMM/YY' text or press insert to
overwrite it. Is it possible to get this text to automatically delete
once the text box is clicked?

I have searched the group but can't find anything - any help would be
great!!

Thanks in advance

Paul

Susan

User Form Text Box - auto delete prompt text
 
Private Sub Textbox1_Click()
Textbox1.value = ""
End Sub

hope that helps!
susan


On Jul 31, 10:07*am, wrote:
Hi Guys,

I have a text box that I am using to record date of birth. I am using
the DD/MMM/YY format to avoid US / UK format confusion. I have written
the text 'DD/MMM/YY' in the text box as a prompt for the user to enter
the correct date format.

At the moment when the user clicks the Date of Birth text box they
either need to delete the 'DD/MMM/YY' text or press insert to
overwrite it. Is it possible to get this text to automatically delete
once the text box is clicked?

I have searched the group but can't find anything - any help would be
great!!

Thanks in advance

Paul



Susan

User Form Text Box - auto delete prompt text
 
ignore that - there apparently is NO click event for a
textbox.........
hmmmmmm.
i don't know!
sorry
susan


On Jul 31, 10:13*am, Susan wrote:
Private Sub Textbox1_Click()
Textbox1.value = ""
End Sub

hope that helps!
susan

On Jul 31, 10:07*am, wrote:



Hi Guys,


I have a text box that I am using to record date of birth. I am using
the DD/MMM/YY format to avoid US / UK format confusion. I have written
the text 'DD/MMM/YY' in the text box as a prompt for the user to enter
the correct date format.


At the moment when the user clicks the Date of Birth text box they
either need to delete the 'DD/MMM/YY' text or press insert to
overwrite it. Is it possible to get this text to automatically delete
once the text box is clicked?


I have searched the group but can't find anything - any help would be
great!!


Thanks in advance


Paul- Hide quoted text -


- Show quoted text -




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

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