The error is caused by the missing code function. You need the code in blue below the sub-heading 'Test the code', from the link, in a separate module accessible from your worksheet.
Your worksheet extract confirms what I imagined