Ask Your Question
0

textbox (form control): i'd like to insert example text that automatically desappear once clicked with mouse. how to?

asked 2016-11-17 16:44:10 +0100

updated 2016-11-17 16:45:06 +0100

Example: creating a form in which users are requested to insert emails. i create the textbox with form controls, and inside the textbox i write name@yourdomain.com. once you click on the textbox, i want that example text automatically disappear and the field becomes empty. How to do it? i've tried several ways but can't solve. i'd like to do as every f*g form does everywhere.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-11-17 17:18:45 +0100

peterwt gravatar image

I think the only way is to use a Macro.
Using the "When receiving focus" event of the text box to run a Macro that sets the Text property of the text box to empty "".


Sub Tclear(oEvent)
Tbox = oEvent.Source
Tbox.Text = ""
End Sub

You can use this Macro for any text box on any form as it uses the event argument oEvent to identify the text box.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-11-17 16:44:10 +0100

Seen: 52 times

Last updated: Nov 17 '16