A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Dissapearing Message



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2009, 04:48 PM posted to microsoft.public.excel.misc
Scafidel[_2_]
external usenet poster
 
Posts: 41
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  
Old April 21st, 2009, 05:29 PM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 7,584
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  
Old April 21st, 2009, 08:09 PM posted to microsoft.public.excel.misc
Scafidel[_3_]
external usenet poster
 
Posts: 11
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  
Old April 21st, 2009, 08:30 PM posted to microsoft.public.excel.misc
Gary''s Student
external usenet poster
 
Posts: 7,584
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:03 PM.


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