This error number can appear in several different situations. What you need to do to depends on the specific details of the error message.
If the error message contains the following information: Error: 5, Module 'mSpelling', Routine 'CheckString', Line Number 2128. Invalid procedure call or argument.
The problem appears to be related exclusively to the use of the "Spanish (Latin America)", which is only partially supported by Windows XP. The only solution is to use a different variant of the language, or upgrade to a newer OS.
If the error message contains the following information: Error: 5, Module 'frmAutoSearch', Routine 'Layout', Line Number 2370. Invalid procedure call or argument.
This may be caused by there being incorrect information in the Registry. To fix this problem, follow these procedures: