Sub ImportModules() Debug.Print "test" End Sub Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:01"), "domeprog.ThisWorkbook.ImportModules" End Sub
The code above will run the macro called ‘ImportModules’ one second after the workbook is opened.
If the macro is located in a class module or in ThisWorkbook class, then you will need to call out the library + class + member name. You can find this info in the Object Browser (press f2 or click on icon) and then typing your macro name in the search box.
If the macro is located in a regular module, then you can just call the member name like this
Application.OnTime Now + TimeValue("00:00:01"), "ImportModules"