A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You need to wrap the second parameter in the call to the VBScript.RegExp.Replace method in parentheses (which forces the argument to be passed by value instead of by reference). This error was introduced in Office version 2508. I have raised it directly with the MS Access engineering team (I'm an Access MVP), but have not gotten a direct response from them yet (which is unusual). See this article I wrote for details about the error and example code for the workaround described above.