Activate a Ribbon tab in two different ways

Here I discuss two different ways to activate a particular Ribbon tab. One is to use the SendKeys method that simulates keystrokes as if you were pressing the keys manually in the active window, and the other is to use XML and VBA code.

The SendKeys method

XML and VBA code (in Excel 2010 and later)