Error is always reported when code is running

Dear friends in the forum, can you help me see what’s wrong with my code? I have tried many times, but I can’t run the results. I also checked the code carefully, but I couldn’t find the cause of the error. I hope that some kind person can help me see what problems exist in the code. Thank you very much.
kaifang.mod (6.9 KB)

Please do not cross-post. See