That was going to be my advice too, but I stepped away in case someone had more patience than I have.
(testing it in an empty drawing actually caused me to shut down AutoCAD by brute force ..
ditto
also Have a look at reworking the location of the error deinition. It is better located as a local function in each of the primary commands.
.. there are several examples of the desirable way to bo this on the site.
also, get rid of the "_end of xxx " comments.
also, perhaps add a simple program description comment before each routine.
also add meaningfull prompts to your selection commands.
also, add some sort of assertion trap for the availability of files you are trying to load.
.. now, back in the real world . In the VL IDE Debug menu select Animate, Stop Once, Break on Error. Then from the view Menu display the Watch window
Split the screen so that Acad is on one side and the VLIDE is on the other ... then run the routine, you may be surprised with what you see.