0

As described in the solution here I created the following VBA to minimize the ribbon menu in Excel:

Sub Minimize_Ribbon()
SendKeys "^{F1}"
End Sub

However, when I run this VBA it opens the following link to the Help section from Microsoft:
https://learn.microsoft.com/de-de/office/vba/api/overview/language-reference?redirectedfrom=MSDN

I assume this issue is because somewhow the ^ which should run the Ctrl is not working in the VBA.
What do I need to change to make it work correctly?

braX
  • 11,506
  • 5
  • 20
  • 33
Michi
  • 4,663
  • 6
  • 33
  • 83

1 Answers1

0

As already described in the comments the solution is:

Sub Minimize_Ribbon()
CommandBars.ExecuteMso "MinimizeRibbon"
End Sub
Michi
  • 4,663
  • 6
  • 33
  • 83