I developed a macro which runs well on one PC, but on the remote PC there is an error "Run-time error '5': "Invalid procedure call or argument"" when executing the macro. When I start debugging, it fails at the "LEFT" command for searching in a string. What can be wrong?
If you have searched for a position of a certain character in a string first, with "InStr" and then use this position in the LEFT command as a variable, the position may be "0", null or negative.

This can happen, if you e.g. search for "." in a string.

On one PC with regional settings where the "." is the decimal character, it may work, and on the other PC a "," is used as a decimal character in the regional settings, and the VBA macro will no longer find the decimal character.

This could also result in an overflow, if you try to convert a string to a double, with an incorrect decimal character, and convert this double into a date format.