Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default CLEAR FIELD TEXT ON CLICK?

Hi. I have a form that I'd like to automatically clear when it's
clicked for text input. Is this possible in excel?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default CLEAR FIELD TEXT ON CLICK?

On May 21, 12:36*pm, KLZA wrote:
Hi. *I have a form that I'd like to automatically clear when it's
clicked for text input. *Is this possible in excel?


Private Sub TextBox1_Enter()
Me.TextBox1.Text = ""
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default CLEAR FIELD TEXT ON CLICK?

Thanks. But how do I apply this to a field? I'm using a field
instead of a text box.

JW wrote:
On May 21, 12:36�pm, KLZA wrote:
Hi. �I have a form that I'd like to automatically clear when it's
clicked for text input. �Is this possible in excel?


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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default CLEAR FIELD TEXT ON CLICK?

On May 21, 12:42Â*pm, KLZA wrote:
Thanks. Â*But how do I apply this to a field? Â*I'm using a field
instead of a text box.



JW wrote:
On May 21, 12:36�pm, KLZA wrote:
Hi. �I have a form that I'd like to automatically clear when it's
clicked for text input. �Is this possible in excel?


Private Sub TextBox1_Enter()
Â* Â* Me.TextBox1.Text = ""
End Sub- Hide quoted text -


- Show quoted text -


Oh. I was assuming you were talking about a UserForm. Are you
referring to a cell on a worksheet? If so, you can do something like
this, assuming the cell you want to clear is A2. This code would go
in the sheet's code module. Right click the sheet tab and select View
Code. Then paste this in there.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$2" Then Target.ClearContents
End Sub
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
How to clear content from unprotected Field Amean1 Excel Worksheet Functions 1 November 11th 06 07:50 PM
Click in one field and data presented in another field gravesen Excel Discussion (Misc queries) 0 July 31st 06 05:48 AM
how do i create a button to clear a value field i created? sofodile Excel Programming 1 September 22nd 05 09:21 PM
UserForm TextBoxes (with ControlSource set) won't clear in one click Paul Martin Excel Programming 2 March 17th 05 11:55 AM
HELP!! Populate text in single XL field, or bulk copy text into 1 field filmfatale[_2_] Excel Programming 0 December 9th 03 02:30 PM


All times are GMT +1. The time now is 04:39 PM.

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

About Us

"It's about Microsoft Excel"