The Commandbars object has an ExecuteMso method that allows you to "click" any button on the ribbon, so:
Application.CommandBars.ExecuteMso ("VisualBasic")
As noted by the Comintern, the Application qualification is required when using this in the Workbook_Open event, otherwise you will receive an error message 91.
To find mso, go to the quick access panel in the feed menu, find the one you need and hover over it:

source share