View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Akash Akash is offline
external usenet poster
 
Posts: 125
Default Converting cell content into comment

On Sep 4, 4:00 pm, Boris wrote:
On Tue, 04 Sep 2007 10:13:01 -0000, Akash wrote:
Hi still its not working dear.


...

Akash,

I've already posted this as answer tou you in
microsoft.public.excel.programming group, but here it is one more time:
---
Sub DoComment()
Dim R As Range, rF As Range, cFirst As String

Set R = ActiveSheet.UsedRange.Find("Leave", _
LookIn:=xlValues, _
LookAt:=xlPart, _
MatchCase:=False)
If Not R Is Nothing Then
cFirst = R.Address
Do
R.AddComment "Leave in cell"
Set R = ActiveSheet.UsedRange.FindNext(R)
Loop Until R Is Nothing Or R.Address = cFirst
End If
End Sub
---
It works (tried), and it take a bit less time since it does not loop
through every cell in that worksheet.

B.


Thanks a tonnn for the solution . Thank u very much