I am still confused about how you intend to handle edits of table structure - which should be very rare event. User sends you file, you modify table structure and/or other objects, return file to user. This assumes user does not enter/edit records in the meantime.
Why doesn't code work, what happens - error message, wrong results, nothing?
Step debug - review link at bottom of my post for guidelines.
I'm with ItsMe - split database is best. Then on the rare occasions of table modification, user will have to send you their backend for modification and they cannot enter/edit records until the revision is received.