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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Addingcomments in Excel Cell

Status
Not open for further replies.

cparralesl

Programmer
Jan 27, 2002
118
NI
Guys,

I'm trying to insert comments in a Excel cell, since a new macro I've created. But no success.

Here is the Macro code:
Code:
Sub Macro1()
'
' Macro1 Macro
' Macro grabada el 16/12/2009 por cparrales
'

'
    Range("A5").Select
    Range("A5").AddComment
    Range("A5").Comment.Visible = False
    Range("A5").Comment.Text Text:="cparrales:" & Chr(10) & "Hola" & Chr(10) & "1" & Chr(10) & "2" & Chr(10) & "3"
    Range("B3").Select
End Sub

Any help will be appreciated.

Regards,

Cesar Humberto Parrales
Application Support
 
Hi guys,

I've it solved already! Here it is my code in VBScript:

Code:
objXls.Worksheets("Sumary").Range(xRange).AddComment
objXls.Worksheets("Sumary").Range(xRange).Comment.Visible = False
objXls.Worksheets("Sumary").Range(xRange).Comment.Text("Reason:" & Chr(10) & Comment)

Thanks a lot!

Cesar Humberto Parrales
Application Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top