Skip to main content

ExcelSetCellComment

Structure

ExcelSetCellComment(iRow,iCol,sComment)

Type

Procedure

Description

This procedure sets the comment in the indicated cell of the current sheet.

Parameters

iRow = The row of the cell to set the comment in. 1 is the top row.

iCol = The columns of the cell to set the comment in. 1 corresponds to column A

sComment = The text to set as the cell's comment

Example

Try
ExcelNewFile(3,"v2003")
ExcelGetSheetByIndex(1)
ShowMessage(ExcelGetCellComment(1,1)) 'Returns ""
ExcelSetCellComment(1,1,"This is a comment")
ShowMessage(ExcelGetCellComment(1,1)) 'Returns "This is a comment"
Except
ShowMessage(LastExceptionMessage)
End Try