I have an Excel application, built in VBA, which needs to be deployed to a group of users.
It turns out that some of them may have the 'Compile On Demand' option within VBA switched off (I have it switched on) and I've discovered that turning it off causes an error when Excel starts.
The application consists of two add-ins, and the error occurs when the first add-in uses the Application.Run method to call a function in a module which is in the second add-in. The error message is: " ''The macro PrB.xla!'!modApplication.HideControls' cannot be found "
The file, module and macro all exist, and I get no error when running with Compile On Demand switched on.
Also, having triggered the error, if I then turn Compile On Demand on and rerun the Workbook_Open event handler which causes the error then it works fine. Turn Compile On Demand off again and rerun, and again it works fine. Then restart Excel and I get the error again.
Can anyone shed any light on why this happens, and whether there is a way to get round it without having to turn Compile On Demand on for all of the users?