Bonjour,
j'essaye d'ouvrir mon tableur en masquant toutes les bars d'outils mais je ne vois plus le haut de la fenêtre avec la croix pour fermer le tableur... ?
Par ailleurs, j'aimerai masquer la permière ligne mais j'ai une erreur : "Unable to set the Hidden property of the Range class" .
Merci d'avance, 🙂
baptiste
j'essaye d'ouvrir mon tableur en masquant toutes les bars d'outils mais je ne vois plus le haut de la fenêtre avec la croix pour fermer le tableur... ?
Par ailleurs, j'aimerai masquer la permière ligne mais j'ai une erreur : "Unable to set the Hidden property of the Range class" .
Code:
Private Sub Workbook_Open()
'Masquer la première ligne
Application.Range("A1").Select
Application.Selection.EntireRow.Hidden = True
'Masquer les bars de menu
For Each CommandBar In Application.CommandBars
CommandBar.Enabled = False
Next
'Ajuster la fenêtre à la bonne taille
With ActiveWindow
.WindowState = xlNormal
.Top = 1
.Left = 1
.Height = Application.UsableHeigh
.Width = Application.UsableWidth
End With
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
'Afficher les ScrollBars ***est-ce bien utile ?***
ActiveWindow.DisplayHorizontalScrollBar = True
ActiveWindow.DisplayVerticalScrollBar = True
ActiveWindow.LargeScroll ToRight:=1
ActiveWindow.LargeScroll ToLeft:=1
Application.DisplayScrollBars = True
Application.DisplayFullScreen = True
'Désactivation des racourcis VB_Windows
Application.OnKey "%{F8}", ""
Application.OnKey "%{F11}", ""
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayFullScreen = False
'Réactiver les CommandBars
For Each CommandBar In Application.CommandBars
CommandBar.Enabled = True
Next
Application.DisplayAlerts = False
Application.DisplayFormulaBar = True
End Sub
Merci d'avance, 🙂
baptiste