2

How to execute a function from a Ribbon Control? FAQ Link

Application.CommandBars.ExecuteMso ("idMSO")

Sample: Close current database ("Office Button" / "Close Database")

Application.CommandBars.ExecuteMso ("FileCloseDatabase")