Manipulate Cell Comments

Apprentice88

New Member
Joined
May 26, 2010
Messages
4
Hi,

I am new to Visual Basic and would appreciate any help.

How do I make cell comments display information from other cells?

Thanks,

The Apprentice
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Here's a simple example

Code:
Sub AddCmt()
Range("A1").NoteText Text:=Range("B1").Value
End Sub
 
Upvote 0
For instance:

Code:
Sub f()
    Range("A1").AddComment
    Range("A1").Comment.Text Range("A2").Value
End Sub
 
Upvote 0
Thank you very much, How do i make this occur automatically without having to compile or run the macro?

For instance, use a Worksheet_Change event like the one you can find in this forum for many thousand times already...
 
Upvote 0
BTW... you may wanna change Range("A1").NoteText Text:=Range("B1").Value to: cStr(Range("A1").NoteText Text:=Range("B1").Value). this way if the comment you're trying to add is entered as a number, Excel may bark at you.. also, if there's an existing comment in A1, you may wanna remove it first. this is what i would do:

Code:
Sub whatever()
 Range("A1").Comment.Delete
 Range("A1").AddComment
 Range("A1").Comment.Visible = False
 Range("A1").Comment.Text CStr(Range("A2").Value)
End Sub
 
Upvote 0
Can you explain in more detail exactly what you want to happen.

I am working on a spreadsheet that does calculations for my manufacturer and most of the sheet is based on formulas and circular references causing the cell information to always be updated according to the user input. I need the comments that I add to the "user input cells" to display information from other cells on the sheet without me having to manually run the macro.
 
Upvote 0
if by "automatically" you mean when smth changes in the sheet - you enter this into a Sheet Module:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
 Range("A1").Comment.Delete
 Range("A1").AddComment
 Range("A1").Comment.Visible = False
 Range("A1").Comment.Text CStr(Range("A2").Value)
End Sub
 
Upvote 0
if by "automatically" you mean when smth changes in the sheet - you enter this into a Sheet Module:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
 Range("A1").Comment.Delete
 Range("A1").AddComment
 Range("A1").Comment.Visible = False
 Range("A1").Comment.Text CStr(Range("A2").Value)
End Sub

Thank you very much it works perfectly!
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top