If only Date() is used, the VBA library is searched last.
The search for a global function proceeds as follows:
- First, the VB project of the application
- Then the references of the VB project (excluding VBA Lib)
- Finally: VBA library
Quick fix:
Use VBA.Date() instead of just Date(). This eliminates the need to search the libraries.