S
Sylvain
Guest
Bonsoir,
Je souhaiterais avoir mon application en plein écran, j'ai presque réussi à 2 exceptions : j'ai toujours la barre où l'on saisi les formules qui apparait et j'ai m'aimerais faire apparaître ma barre d'outil perso qui s'appelle persobarre. Je crois que je dois avoir un souci dans mon code de mon thisworkbook ci dessous
merci pour le coup de main
Option Explicit
Dim WS As Worksheet
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
Worksheets("message").Visible = xlSheetVisible
For Each WS In Worksheets
If WS.Name <> "message" Then WS.Visible = xlSheetVeryHidden
Next WS
With Application
.DisplayAlerts = True
.ScreenUpdating = True
End With
Dim Mbar As CommandBar
For Each Mbar In Application.CommandBars
If Mbar.BuiltIn = True Then
Mbar.Enabled = True
End If
Next
Application.DisplayStatusBar = True
Application.DisplayFormulaBar = True
With ActiveWindow
.DisplayGridlines = True
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
.DisplayFormulas = True
End With
'si tu veux masquer ta barre
'Application.CommandBars("simulécoporc").Visible = False
Application.DisplayFullScreen = False
UnhideTaskbar
ActiveWorkbook.Save
End Sub
Private Sub Workbook_Open()
'HideTaskbar
Dim Mbar As CommandBar
For Each Mbar In Application.CommandBars
If Mbar.BuiltIn = True Then
Mbar.Enabled = False
End If
Next
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = False
.DisplayFormulas = False
End With
Application.DisplayFullScreen = True
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
For Each WS In Worksheets
WS.Visible = xlSheetVisible
Next WS
Worksheets("message").Visible = xlVeryHidden
With Application
.DisplayAlerts = True
.ScreenUpdating = True
End With
'imposer à une bare d'outils perso un emplacement précis dans une fenêtre ?
'With Application.CommandBars("toto")
'.Position = msoBarRight
'.Visible = True
'End With
'si tu veux afficher ta barre
'Application.CommandBars("simulécoporc").Visible = True
End Sub
Je souhaiterais avoir mon application en plein écran, j'ai presque réussi à 2 exceptions : j'ai toujours la barre où l'on saisi les formules qui apparait et j'ai m'aimerais faire apparaître ma barre d'outil perso qui s'appelle persobarre. Je crois que je dois avoir un souci dans mon code de mon thisworkbook ci dessous
merci pour le coup de main
Option Explicit
Dim WS As Worksheet
Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
Worksheets("message").Visible = xlSheetVisible
For Each WS In Worksheets
If WS.Name <> "message" Then WS.Visible = xlSheetVeryHidden
Next WS
With Application
.DisplayAlerts = True
.ScreenUpdating = True
End With
Dim Mbar As CommandBar
For Each Mbar In Application.CommandBars
If Mbar.BuiltIn = True Then
Mbar.Enabled = True
End If
Next
Application.DisplayStatusBar = True
Application.DisplayFormulaBar = True
With ActiveWindow
.DisplayGridlines = True
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
.DisplayFormulas = True
End With
'si tu veux masquer ta barre
'Application.CommandBars("simulécoporc").Visible = False
Application.DisplayFullScreen = False
UnhideTaskbar
ActiveWorkbook.Save
End Sub
Private Sub Workbook_Open()
'HideTaskbar
Dim Mbar As CommandBar
For Each Mbar In Application.CommandBars
If Mbar.BuiltIn = True Then
Mbar.Enabled = False
End If
Next
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = False
.DisplayFormulas = False
End With
Application.DisplayFullScreen = True
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
For Each WS In Worksheets
WS.Visible = xlSheetVisible
Next WS
Worksheets("message").Visible = xlVeryHidden
With Application
.DisplayAlerts = True
.ScreenUpdating = True
End With
'imposer à une bare d'outils perso un emplacement précis dans une fenêtre ?
'With Application.CommandBars("toto")
'.Position = msoBarRight
'.Visible = True
'End With
'si tu veux afficher ta barre
'Application.CommandBars("simulécoporc").Visible = True
End Sub