I have a script using 'Workbook_Activate' that performs a few actions when the workbook opens, among them is to minimize the Ribbon using SendKeys. (I only want the Ribbon minimized, not hidden, that's why SendKeys.) I have another script using 'Workbook_Deactivate' that reverses these actions, but the SendKeys line won't run. It does'nt lock up, it just doesn't restore the Ribbon. Any ideas would be appreciated. (BTW: all the other commands work fine both opening and closing and yes, I've tried 'Workbook_BeforeClose' with the same results.) Heres my script:

Option Explicit
______________________________________________

Private Sub Workbook_Activate()
Application.ScreenUpdating = False
Worksheets("Class Scores").Activate
ActiveWindow.WindowState = xlMaximized
Application.WindowState = xlMaximized
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
Range("Y5").Select
Application.DisplayFormulaBar = False
If Application.CommandBars.Item("Ribbon").Height > 60 Then
Application.SendKeys ("^{F1}")
Else: GoTo Finish:
End If
Finish:
Application.ScreenUpdating = True
Call ToggleCutCopyAndPaste(False)
End Sub
_______________________________________________________

Private Sub Workbook_Deactivate()
Application.SendKeys ("^{F1}")
Application.DisplayFormulaBar = True
Call ToggleCutCopyAndPaste(True)
End Sub