Error convert OleStr into type Double

Hello,

I have a simple code that takes data from a spreadsheet, puts it into variables, compares variables and adds them up (sum). I often get the error “Could not convert variant of type (OleStr) into type (Double) when evaluating instruction OperSub ($0,$0,$0,$0,”").
Are there any known bugs and ways around it?
Another question, the guide says variable declaration is optional. If I don’t declare a variable I get an error.

Thanks.

Yes, they are optional unless you try arithmetic operations with non-integer values.