Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this. It might give you some insight:
Sub EFGH() Dim rng As Range Dim cmt As Comment Dim DestCPR As String Dim ocount As Long DestCPR = "A" ocount = 10 On Error Resume Next Set rng = Nothing Set cmt = Nothing Set rng = ActiveSheet.Range(DestCPR & ocount) If rng Is Nothing Then MsgBox "Invalid range" Else Set cmt = Nothing Set cmt = rng.Comment If Not cmt Is Nothing Then MsgBox "cmt exist: " & cmt.Text Exit Sub End If Set cmt = Nothing Set cmt = rng.AddComment("Formula price") If cmt Is Nothing Then MsgBox "Range Good, Comment Bad" End If End If On Error GoTo 0 End Sub -- Regards, Tom Ogilvy "Maury Markowitz" wrote in message ... "Dave Peterson" wrote: Are you sure the correct sheet is active? Yes. Is that activesheet protected? No. What else does the error message say? Nothing, just the generic error, whatever it was. Maury |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
adding a hyper link to a cell comment | Excel Discussion (Misc queries) | |||
Adding a comment to a cell | New Users to Excel | |||
adding comment to cell | Excel Discussion (Misc queries) | |||
Adding a comment to a formula-not a cell | Excel Discussion (Misc queries) | |||
Adding Comment to cell | Excel Programming |