[SOLVED] IF AND - not correct atribute value

Hi!
I have a difficult problem. When I try to check this:

oView = ThisComponent.getCurrentController()
oSheet = oView.activesheet

cellToCheckLeft = oSheet.getCellByPosition(col, row)
cellToCheckRight = oSheet.getCellByPosition(col + 1, row)

If ( cellToCheckLeft.String <> "" ) AND  ( cellToCheckLeft.String <> "0" ) AND ( cellToCheckRight <> "" )  Then
	isWing = true
Else
	isWing = false
EndIf

I have got an error (sorry translated from my language): not correct atribute value on row:

If ( cellToCheckLeft.String <> "" ) AND  ( cellToCheckLeft.String <> "0" ) AND ( cellToCheckRight <> "" )  Then

I checked Wiki:
https://help.libreoffice.org/Basic/If...Then...Else_Statement_Runtime

Also this forum:

But it works in above excample. Why it is not correct in my code?

THANKS!

Please check at which case had you forgot the .String :wink:

The error message is “Incorrect property value” and happens because of cellToCheckRight <> "" where you omitted .String so it should be cellToCheckRight.String <> "" instead.

f*** right. It is too late. Thanks!