This triggers when the VBScript (in an excel based app) attempts to complete a userform and insert data into a table in a SQL database.
This affects only one user, it works fine for everyone else.
The error message reads 'the conversion of a varchar data type to a datetime data type resulted in an out-of-range value.'
I've checked for quote marks accidentally being included in date fields. I've checked all settings in the user's excel config/Trust Centre. I've compared everything visible in the userform to a user who doesn't have this problem.
All users are accessing the same file that contains the VBScript so there can't be any differences in the code, it must be something to do with either the way it's evaluated by different user's machines or access permissions.
I've made sure all external connections are enabled in the user's excel config, matching the config of a user that can use the userform fine. I've tested on another user's machine by intentionally inserting text strings in quotes into date fields to try to reproduce the bug - it doesn't.