Skip to main content

ExcelGetCellIsError

Structure

ExcelGetCellIsError(iRow,iCol)

Type

Function

Description

This function returns '1' if the indicated cell of the current sheet is an error, and '0' if not.

Parameters

iRow = The row of the cell. 1 is the top row.

iCol = The column of the cell. 1 corresponds to column A

Example

Try
ExcelNewFile(3,"v2003")
ExcelGetSheetByIndex(1)
ShowMessage(ExcelGetCellIsError(1,1)) 'Returns "0"
ExcelSetCellAsFormula(1,1,"=5/0") ' Formula =5/0 will error because of division by 0
ShowMessage(ExcelGetCellIsError(1,1)) 'Returns "1"
Except
ShowMessage(LastExceptionMessage)
End Try