Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cell comments - What am I doing wrong Run-time error 91

Status
Not open for further replies.

malibu65k

Programmer
Sep 27, 2004
131
US
I'm not sure what I'm doing wrong here. I've tried every example for this that I've seen...


If (conInt > 10) And (conInt < 33) Then
Set cmt = ActiveSheet.Cells(RowCount, 1).Comment
With cmt
Text Text:="901-031-573-104" <<<<< error is here <<<<<<
End With
End If



Thank you in advance for any help
 

hi,

osprey, eh?

Text needs to refer [red]BACK TO[/red] the cmt object...
Code:
    If (conInt > 10) And (conInt < 33) Then
        Set cmt = ActiveSheet.Cells(RowCount, "B").Comment
        With cmt
            [b][red].[/red][/b]Text Text:="901-031-573-104" '<<<<< error is here <<<<<<
        End With
    End If

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Osprey?!! How did you know?


I found one that works!

Sub myComment()
Dim rng As Range

Set rng = Sheet1.Range("A5")
rng.ClearComments
rng.AddComment "This is a test comment!"

End Sub
 
Osprey 901-whatever, eh?

Boeing or Bell?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
LOL!!! Neither. I'm a V-22 Logistics Annalyst for another company contracted by the government.
 
Get those parts out for those Thunder Chickens!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top