http://quicktesthp.blogspot.com

QTP VBScript new series + Interview Question Bank on QTP for enrichment of Knowledge in QTP

This Site has been brought to you by HP Certified Expert of QTP.

Exciting new articles for October:

1) QTP Tip:Deselect all Radio Buttons

2) HP QTP Crypt Object

3)Adding Hyperlinks in Excel Spreadsheet

Best of Luck Friends ! ! !

Expert QTP
expert.qtp@gmail.com

All Articles are Copyright Protected. These are Free for Reading & Personal Use. Reproduction in Any Form without the Permission is Illegal & Strictly Prohibited.

Copyright © 2009 ExpertQTP

Google Search

Thursday, October 27, 2011

QTP Add Comment Excel Object

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



Read more...


 
Copyright © 2009 ExpertQTP