Pbl affichage plein écran

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
 
@

@Christophe@

Guest
Bonsoir,

Voila un code pour te donner du full full screen,

!!!N'oublie pas de prévoir un bouton pour quitter!!!
Ou utilise ALT + F4 si tu oublies, lol

Bonne chance


Option Explicit

Private Sub Workbook_Open()
Application.CommandBars(1).Enabled = False
Application.DisplayFullScreen = True
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(1).Enabled = True
Application.DisplayFullScreen = False
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
End Sub


@Christophe@
 

Discussions similaires

Réponses
2
Affichages
636
Réponses
7
Affichages
486
Réponses
8
Affichages
831

Statistiques des forums

Discussions
314 450
Messages
2 109 721
Membres
110 551
dernier inscrit
Khyolyanna