I have an excel report where I created a VBA component that is supposed to open an Access (Office 365) database and run a macro in that database. On my computer and another colleague's it works perfectly. On two other people's computers, everything works except that their machines will open the database, but it won't run the macro. We have verified that they have enabled macros so that's not the reason. I have no idea why it won't run the macros. When we do it manually it works as well. I'm stuck here!! The VBA code in question is below. Thanks for any help!
- Dim FSO
-
Set objFSO = CreateObject("Scripting.FileSystemObject")
-
On Error Resume Next
-
-
Set ObjAccess = CreateObject("Access.Application")
-
-
ObjAccess.OpenCurrentDatabase "MYDATABSE.accdb"
-
ObjAccess.DoCmd.RunMacro "05 - Import New Additions and Add to Master Data"
-
Set ObjAccess = Nothing