Greetings,
I am having issues using the Application.SendKey F1. I have entered the following code and then close the workbook. When I open the workbook, the command area of the ribbon is hidden - all good. But when I close the workbook and open another workbook, the command area is still hidden. And when I open the original workbook (with the following code), the command area is shown.
Private Sub Workbook_open()
If Application.CommandBars("Ribbon").Height > 60 Then
Application.SendKeys ("^{F1}")
DoEvents
End If
End Sub
Private Sub Workbook_deactivate()
If Application.CommandBars("Ribbon").Height < 60 Then
Application.SendKeys ("^{F1}")
DoEvents
End If
End Sub
Bookmarks