I have a VBA project which uses two workbooks on the same time. In workbook A, a module calls a module from workbook B like this:
If oED Is Nothing Then
Set oED = Application.Run("'" & workbookB & "'!wbB.MainModule.InitDatabaseObject")
End If
This has previously worked fine, but suddenly (apparently) this line of code doesn't find the module/macro in the other workbook.
I get this error message
Error 1004. The macro may not be available in this workbook or all macros may be disabled.
I have tried to:
- Clear the macro settings in Excel
- Clean the workbook (using a tool)
- Delete ActiveX cache files (*.exd files)
When my work colleague runs the same workbooks on his computer, this works fine.
Does anyone have a clue what's going on?
Br, Johan
wbB
andMainModule
weren't renamed. – Vincent GApplication.AutomationSecurity
set to? – Rory