Option Explicit
Private Declare Sub keybd_event Lib "user32" ( _
ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Sub Masquer_Afficher_Ruban()
'Simule Ctrl+F1 (à lancer depuis la feuille de calcul)
Const VK_CONTROL = &H11
Const VK_F1 = &H70
Const KEYEVENTF_KEYUP = &H2
keybd_event VK_CONTROL, 0, 0, 0
keybd_event VK_F1, 0, 0, 0
keybd_event VK_F1, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_CONTROL, 0, KEYEVENTF_KEYUP, 0
End Sub