Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

QTP Add Comment Excel Object

Tags: excel visible
The following code will add a comment in a particular cell in Excel worksheet.

Set oExcel=CreateObject("Excel.Application")

oExcel.Visible=True

Set oWorkBook=oExcel.Workbooks.Add

Set oWorkSheet=oWorkBook.Worksheets(1)

With oWorkSheet.Cells(1,1).AddComment

.Visible = False

.Text "Comment for Cell 1,1"

End With

In case, you want to update the comment, use the following code:

With oWorkSheet.Cells(1,1).Comment

.Visible = True

.Text "Comment Text Changed"

End With


This post first appeared on QTP: Expert In HP QuickTest Professional (QTP), please read the originial post: here

Share the post

QTP Add Comment Excel Object

×

Subscribe to Qtp: Expert In Hp Quicktest Professional (qtp)

Get updates delivered right to your inbox!

Thank you for your subscription

×