VBA compiler RUNTIME ERROR with Range parameters

The Padlock demo code, modified for calculation with cell values:

14 Function ten(x As Range)
15 ten = x +10
16 End Function

it leads to a correct result, but also there comes the error message:
RUNTIME ERROR
Could not convert variant of type (UnicodeString) into type (Double) when evaluating (…).
Source position: 15,11
Why the message and how to avoid it? (I also tried: ten = x.value +10 but then there is then also an error (!) but no result); How to make compiled Function with a Range parameters?

The Demo is a bit outdated, that’s why Function ten(x As Range) is no more accepted by the new compiler.
Try
Function ten(x As Integer) or even Function ten(x)