Sub procedure or function procedure not defined error

Copy code in the weibpage https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03170010.html

How to fix it?


Would you like someone to read the text to you?