I want to hide the Excel ribbon in Workbook_Open then show the ribbon in Workbook_BeforeClose. The Workbook_Open works OK, but in Workbook_BeforeClose, the SendKeys starts Excel Help.
In testing, the same "Show Ribbon" code works OK in any module subroutine except Workbook_BeforeClose. Is there any wany to hide/show the ribbon other then SendKeys?
Here's the code...
Workbook_Open
If (Application.Version >= 12) And (Application.CommandBars("Ribbon").Height >= 80) Then
Call SendKeys("^{F1}")
End If
Workbook_BeforeClose
If (Application.Version >= 12) And (Application.CommandBars("Ribbon").Height < 80) Then
Call SendKeys("^{F1}")
End If
In testing, the same "Show Ribbon" code works OK in any module subroutine except Workbook_BeforeClose. Is there any wany to hide/show the ribbon other then SendKeys?
Here's the code...
Workbook_Open
If (Application.Version >= 12) And (Application.CommandBars("Ribbon").Height >= 80) Then
Call SendKeys("^{F1}")
End If
Workbook_BeforeClose
If (Application.Version >= 12) And (Application.CommandBars("Ribbon").Height < 80) Then
Call SendKeys("^{F1}")
End If