Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 114
Default FIXED TEXT AFTER DELETION

I have seen in some excel sheets, when I delete the input, there is a
watermark or meaning the original text is restated. By way of example:

1. Initial display in cell A1: -Please Input Value-
2. And when a value is entered (say) 1000 + enter = 1,000
3. When the value in 2 above is deleted, the original/initial text -Please
Input Value is- is displayed.

How is this done?

Thank you.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default FIXED TEXT AFTER DELETION

Excel can create a signal (raise an event) when any cell is changed on a sheet..
Custom code triggered by the event can then determine if a particular cell
is empty and add the message to cell...

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$B$5" Then
If Len(Target.Value) = 0 Then Target.Value = "Enter Something"
End If
End Sub

Right-click a sheet tab and select View Code.
Paste the above code in the module, change cell b5 and see what happens.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware




"
wrote in message
I have seen in some excel sheets, when I delete the input, there is a
watermark or meaning the original text is restated. By way of example:

1. Initial display in cell A1: -Please Input Value-
2. And when a value is entered (say) 1000 + enter = 1,000
3. When the value in 2 above is deleted, the original/initial text -Please
Input Value is- is displayed.

How is this done?
Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 114
Default FIXED TEXT AFTER DELETION

That was awsome. What if there are more than 1 cell, (say) 10 cells
(different locations) or triggered by the one's with boxes/by trigger only,
and range of cells?

Thanks. Much Appreciate It!

" wrote:

I have seen in some excel sheets, when I delete the input, there is a
watermark or meaning the original text is restated. By way of example:

1. Initial display in cell A1: -Please Input Value-
2. And when a value is entered (say) 1000 + enter = 1,000
3. When the value in 2 above is deleted, the original/initial text -Please
Input Value is- is displayed.

How is this done?

Thank you.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default FIXED TEXT AFTER DELETION

"Target" is the cell that has been changed.
One can check whether the Target cell is part of a multi-cell range
by using the "Intersect" method in VBA.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"
wrote in message
That was awsome. What if there are more than 1 cell, (say) 10 cells
(different locations) or triggered by the one's with boxes/by trigger only,
and range of cells?

Thanks. Much Appreciate It!

" wrote:

I have seen in some excel sheets, when I delete the input, there is a
watermark or meaning the original text is restated. By way of example:

1. Initial display in cell A1: -Please Input Value-
2. And when a value is entered (say) 1000 + enter = 1,000
3. When the value in 2 above is deleted, the original/initial text -Please
Input Value is- is displayed.

How is this done?

Thank you.


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
Sumproduct issues SteveDB1 Excel Worksheet Functions 25 June 3rd 09 04:58 PM
Find & Replace text format jmn13 Excel Discussion (Misc queries) 2 May 25th 06 06:18 PM
Text Wrapping JMB Excel Discussion (Misc queries) 0 July 29th 05 02:41 AM
Concantenate Text with numbers with fixed form sunslight Excel Worksheet Functions 2 April 24th 05 01:39 AM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


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

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"