Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clicking the text in a textbox erases all the data in the box

I saw on here once a macro that if you had text in a textbox and clicke
on the text, it would erase everything out of the textbox. TIA for th
help

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Clicking the text in a textbox erases all the data in the box

Is this what you mean

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

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"dok112 " wrote in message
...
I saw on here once a macro that if you had text in a textbox and clicked
on the text, it would erase everything out of the textbox. TIA for the
help.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clicking the text in a textbox erases all the data in the box

Not exactly.

What it was, for example when my userform pops up, TextBox1 say
"HH:MM" and when you click on the textbox, it would automatically clea
out the "HH:MM" inorder for the user to put in the actual "01:30".
Simply, it's for entering a time, but I wanted the person that gets th
userform to know which format to insert it in.

Thanks again for your help

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Clicking the text in a textbox erases all the data in the box

What I suggested will work okay for you, but with one important caveat.

To display the HH:MM in the first textboxd, you have to ensure that it
doesn't take the focus when the form is activated. Maybe put a hidden
control on the form and give that a TabIndex of 0.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"dok112 " wrote in message
...
Not exactly.

What it was, for example when my userform pops up, TextBox1 says
"HH:MM" and when you click on the textbox, it would automatically clear
out the "HH:MM" inorder for the user to put in the actual "01:30".
Simply, it's for entering a time, but I wanted the person that gets the
userform to know which format to insert it in.

Thanks again for your help.


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Clicking the text in a textbox erases all the data in the box

Possibly you could use two controls;
One label covering the text box which goes invisible on clicking it to
reveal
the textbox under it.

"Bob Phillips" wrote in message
...
What I suggested will work okay for you, but with one important caveat.

To display the HH:MM in the first textboxd, you have to ensure that it
doesn't take the focus when the form is activated. Maybe put a hidden
control on the form and give that a TabIndex of 0.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"dok112 " wrote in message
...
Not exactly.

What it was, for example when my userform pops up, TextBox1 says
"HH:MM" and when you click on the textbox, it would automatically clear
out the "HH:MM" inorder for the user to put in the actual "01:30".
Simply, it's for entering a time, but I wanted the person that gets the
userform to know which format to insert it in.

Thanks again for your help.


---
Message posted from http://www.ExcelForum.com/





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
display the textbox by clicking a cell tkraju via OfficeKB.com Excel Discussion (Misc queries) 0 November 4th 09 06:13 PM
text outside merge cells despite clicking wrap text chedd via OfficeKB.com Excel Worksheet Functions 5 July 17th 08 09:01 PM
Trendline erases chart name jase Charts and Charting in Excel 1 June 21st 06 11:30 PM
Is there a way to underline by clicking on text? atsd Excel Discussion (Misc queries) 2 March 19th 06 10:12 PM
Excel erases the "To:" field when emailing Mike M. Excel Discussion (Misc queries) 2 September 26th 05 01:24 PM


All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"