Error: Class data is not allowed in non-procedural context

In reply to dave_59:

Thank you dave. That worked.