I've been using a function that gets me the comment inserted in a cell. So, the function's output is a string, Then I use built-in function 'len(...)' to get
the length of the string. The new output is an integer. I assign this to a variable already declared as integer and I get the message:
"inadmissible value or data type. Data type mismatch"
Here's the function that outputs comments from cells:
Code: Select all
Function CELL_NOTE(vSheet,lRowIndex&,iColIndex%)
'calls: getSheetCell
REM returns annotation text
Dim v
v = getSheetCell(vSheet,lRowIndex&,iColIndex%)
if vartype(v) = 9 then
CELL_NOTE = v.Annotation.getText.getString
else
CELL_NOTE = v
endif
End Function
Code: Select all
.......................
Dim iCol As Integer
Dim FstCol As Integer
Dim LstCol As Integer
Dim l As Integer
......................
l=len(cell_note(vSheet,lRowIndex&,iCol%)
......................
Thanks in advance and Merry Xmas to all!