View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default HOW DO i SHOW SAME COMMENT TO TWO OR MORE CELLS IN EXCEL

Hi,

1. In the sheet object where you want to have a shared comment add the
following code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1,C1,E1"))
If Not isect Is Nothing Then
Comment1.Show
End If
End Sub

2. Create a UserForm named Comment1 and add a label named lblComment and an
OK button.

3. Add the following code to the UserForm:

Private Sub OK_Click()
Unload Me
End Sub

Private Sub UserForm_Initialize()
Me.lblComment.Caption = Range("A10").Comment.Text
End Sub

4. Add a comment into A10 of the sheet.

The code is designed to launch the userform with the comment displayed
whenever any lf the specified cells are selected A1, C1, E1.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"MASIH" wrote:

HOW DO I SHOW SAME COMMENT TO TWO OR MORE CELLS IN EXCEL