PC Review


Reply
Thread Tools Rate Thread

Comment instead of Data Validation

 
 
=?Utf-8?B?ZGVl?=
Guest
Posts: n/a
 
      9th May 2007
I need to add comments to cells - data validation doesn't work because of the
size limitations in terms of both the size of the data validation box and
the number of characters - so I prefer to simply add regular comments.

However, I wish the comment to appear when I simply click in a cell (or hit
Tab, arrow, etc) I posted within the last few days on this, and received a
response, but it didn't work.



--
Thanks!

Dee
 
Reply With Quote
 
 
 
 
New Member
Join Date: May 2007
Posts: 16
 
      9th May 2007
So you want comments in cells that come into view when the cell is selected?
Then put this into your Worksheet_SelectionChange:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
on error resume next
Target.Comment.Visible = True
if not rLastTarget is nothing then
rLastTarget.Comment.Visible = False
end if
set rLastTarget = Target
End Sub

and you should also put this into the module:
Private rLastTarget As Range

How it works:
When you select a cell in your sheet the comment in the cell will become visible. If you've already selected a cell that had a comment, the previous comment will become invisible and and the current selection becomes visible.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom data validation on cells with data validation values AKrobbins Microsoft Excel Worksheet Functions 2 21st Jun 2011 04:20 PM
copy comment content to cell content as data not as comment =?Utf-8?B?TGlsYWNo?= Microsoft Excel Misc 2 21st Jun 2007 12:28 PM
Comment instead of Data Validation =?Utf-8?B?ZGVl?= Microsoft Excel Misc 2 9th May 2007 12:06 AM
Re: Cell Comment Sticks While Using Validation Debra Dalgleish Microsoft Excel Misc 7 2nd Dec 2006 05:15 PM
When pasting data into a column with data validation I lose validation check Brad Microsoft Excel Misc 5 17th Apr 2004 01:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:37 PM.