#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Dissapearing Message

I have an Excel form type sheet that employees complete which fills other
sheets for printing. How could I have cells with instructive text that would
disappear when clicked on? Like what is used on HTML, i.e., a cell might
contain "Name," another "State," another "Zip," etc.
Thanks
--
Scafidel
Lafayette, Louisiana
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Dissapearing Message

Say we want cell B9 to display "Name" and we want that text to vanish if the
user clicks on B9.

First Insert a hyperlink in B9 to a place in this document, namely B9, and
make the display text "Name". Do not user the =HYPERLINK() function.

So if the user clicks on B9, the cursor jumps to B9 (not very impressive,
huh?)

Then insert the following tiny event macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Target.Range.Clear
End Sub

Now:

1. the user see the text "Name" in B9
2. the user click on B9
3. the hyperlink activates
4. the macro runs and clears B9
5. the user types data into B9
--
Gary''s Student - gsnu200847


"Scafidel" wrote:

I have an Excel form type sheet that employees complete which fills other
sheets for printing. How could I have cells with instructive text that would
disappear when clicked on? Like what is used on HTML, i.e., a cell might
contain "Name," another "State," another "Zip," etc.
Thanks
--
Scafidel
Lafayette, Louisiana

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Dissapearing Message

Thanks, GS, it worked, but once it was used, I had to reinstall the hyperlink
each time. Is there anyway to have it restore the hyperlink, if used and
then emptied?
--
Scafidel
Lafayette, Louisiana


"Gary''s Student" wrote:

Say we want cell B9 to display "Name" and we want that text to vanish if the
user clicks on B9.

First Insert a hyperlink in B9 to a place in this document, namely B9, and
make the display text "Name". Do not user the =HYPERLINK() function.

So if the user clicks on B9, the cursor jumps to B9 (not very impressive,
huh?)

Then insert the following tiny event macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Target.Range.Clear
End Sub

Now:

1. the user see the text "Name" in B9
2. the user click on B9
3. the hyperlink activates
4. the macro runs and clears B9
5. the user types data into B9
--
Gary''s Student - gsnu200847


"Scafidel" wrote:

I have an Excel form type sheet that employees complete which fills other
sheets for printing. How could I have cells with instructive text that would
disappear when clicked on? Like what is used on HTML, i.e., a cell might
contain "Name," another "State," another "Zip," etc.
Thanks
--
Scafidel
Lafayette, Louisiana

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Dissapearing Message

It is possible, but more difficult. The code will have to "remember" the
contents of the cell before clearing it. The code could then use this stored
value to re-populate the hyperlink once the user has cleared the cell.
--
Gary''s Student - gsnu200847


"Scafidel" wrote:

Thanks, GS, it worked, but once it was used, I had to reinstall the hyperlink
each time. Is there anyway to have it restore the hyperlink, if used and
then emptied?
--
Scafidel
Lafayette, Louisiana


"Gary''s Student" wrote:

Say we want cell B9 to display "Name" and we want that text to vanish if the
user clicks on B9.

First Insert a hyperlink in B9 to a place in this document, namely B9, and
make the display text "Name". Do not user the =HYPERLINK() function.

So if the user clicks on B9, the cursor jumps to B9 (not very impressive,
huh?)

Then insert the following tiny event macro in the worksheet code area:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Target.Range.Clear
End Sub

Now:

1. the user see the text "Name" in B9
2. the user click on B9
3. the hyperlink activates
4. the macro runs and clears B9
5. the user types data into B9
--
Gary''s Student - gsnu200847


"Scafidel" wrote:

I have an Excel form type sheet that employees complete which fills other
sheets for printing. How could I have cells with instructive text that would
disappear when clicked on? Like what is used on HTML, i.e., a cell might
contain "Name," another "State," another "Zip," etc.
Thanks
--
Scafidel
Lafayette, Louisiana

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 keep autoshapes from dissapearing behind charts? kyle Charts and Charting in Excel 1 November 13th 08 01:27 AM
Dissapearing tick box Chris J Dixon Excel Discussion (Misc queries) 0 September 15th 08 05:35 PM
Dissapearing Columns Tricia LeAnn[_2_] Excel Discussion (Misc queries) 2 January 29th 08 04:23 PM
The dissapearing Data (on refresh) mystery Kevin Gate Charts and Charting in Excel 0 December 5th 06 09:33 PM
Command button dissapearing down page Lynz Excel Discussion (Misc queries) 5 September 6th 06 08:25 AM


All times are GMT +1. The time now is 05:04 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"