auntie bella
Board Regular
- Joined
- Apr 3, 2009
- Messages
- 50
I found this code on another post which almost does what I want....
========================================
Sub test()
Dim c As Range, d As String
For Each c In Selection
If c <> "" Then d = d & c & Chr(10)
Next
d = Left(d, Len(d) - 1)
Range("A42").Comment.Delete
Range("A42").AddComment d
End Sub
========================================
However I want it to write the comment in row 1 of whichever column I happen to be in - without me having to keep changing the "A42" to whatever.
SO if I select
D4:D10 then the comment is in D1 or
P12:P36 then the comment is in P1 etc.
Can anyone advise?
thanks
========================================
Sub test()
Dim c As Range, d As String
For Each c In Selection
If c <> "" Then d = d & c & Chr(10)
Next
d = Left(d, Len(d) - 1)
Range("A42").Comment.Delete
Range("A42").AddComment d
End Sub
========================================
However I want it to write the comment in row 1 of whichever column I happen to be in - without me having to keep changing the "A42" to whatever.
SO if I select
D4:D10 then the comment is in D1 or
P12:P36 then the comment is in P1 etc.
Can anyone advise?
thanks