ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Comments (https://www.excelbanter.com/excel-programming/382566-comments.html)

Corey

Comments
 
Can you code a comments box to work like :

=Sheet1!B2

And have the value in Sheet1 B2 displayed int he comments box?
Or is there a way to code a Comments box on a Cell?

Corey....



Martin Fishlock

Comments
 
Corey:

You need to use code: and it is a little rigid as you need to use a
worksheet change event.

The solution is to have a table with the cell reference and the text and
work it that way.


Private Sub Worksheet_Change(ByVal Target As Range)

If Not (Intersect(Target, Range("B1")) Is Nothing) Then
On Error Resume Next
Range("A1").AddComment
Range("A1").Comment.Visible = False
Range("A1").Comment.Text Text:=Range("B1").Value
End If
End Sub




--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Corey" wrote:

Can you code a comments box to work like :

=Sheet1!B2

And have the value in Sheet1 B2 displayed int he comments box?
Or is there a way to code a Comments box on a Cell?

Corey....





All times are GMT +1. The time now is 11:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com