Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Maximiser l'affichage à l'écran

4 réponses
Avatar
Peponne31
Bonjour,

Je travaille sur XP et Office 2003, j'ai créer un programme de gestion
d'entreprise(avec votre aide) et je voudrai qu'a l'ouverture d'une feuille,
l'affichage de l'écran soit maximisé et celà quel que soie la taille de
l'écran.
Merci pour votre soutient.
Peponne31

4 réponses

Avatar
Hussard
Bonjour;

Tu veux un affichage plein écran c'est ça ?
Si tel est le cas il faut ajouter l'instruction :
application.DisplayFullScreen =True

Sébastien K

"Peponne31" a écrit dans le message de
news:
Bonjour,

Je travaille sur XP et Office 2003, j'ai créer un programme de gestion
d'entreprise(avec votre aide) et je voudrai qu'a l'ouverture d'une
feuille,
l'affichage de l'écran soit maximisé et celà quel que soie la taille de
l'écran.
Merci pour votre soutient.
Peponne31


Avatar
Peponne31
Bonjour Hussard,

Cela fonctionne mais il me reste encore la bande bleue de la fenètre Excel
(Minimiser, agrandir et fermer).
Est il possible de l'hiniber ?
Merci encore
Peponne31

"Hussard" a écrit :

Bonjour;

Tu veux un affichage plein écran c'est ça ?
Si tel est le cas il faut ajouter l'instruction :
application.DisplayFullScreen =True

Sébastien K

"Peponne31" a écrit dans le message de
news:
> Bonjour,
>
> Je travaille sur XP et Office 2003, j'ai créer un programme de gestion
> d'entreprise(avec votre aide) et je voudrai qu'a l'ouverture d'une
> feuille,
> l'affichage de l'écran soit maximisé et celà quel que soie la taille de
> l'écran.
> Merci pour votre soutient.
> Peponne31





Avatar
Excel...lent
Salut Peponne,
Ci-dessous "un vrai plein écran"
Attention met bien les deux codes dans ThisWorkbook.
Le BeforClose remet l'environnement Excel au standard.
Le Workbook_Open s'occupe du plein écran !
Cordialement
Excel...lent


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim CmdB As CommandBar

With Application
.ScreenUpdating = False
.DisplayAlerts = False
'Réaffiche le Menu Outils, Macros
.CommandBars(1).Controls(6).Controls(12).Enabled = True
'Réaffiche la barre de formule
.DisplayFormulaBar = True
'Réaffiche la barre des status
.DisplayStatusBar = True
End With


For Each CmdB In Application.CommandBars
CmdB.Enabled = True
Next CmdB

With ActiveWindow
.DisplayGridlines = True
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
Application.DisplayFullScreen = False
Application.CommandBars("Standard").Visible = True
Application.CommandBars("Formatting").Visible = True
Application.Interactive = True
End Sub


Private Sub Workbook_Open()
'Exit Sub
Dim CmdB As CommandBar
Application.DisplayFullScreen = True

With Application
.ScreenUpdating = False
.DisplayAlerts = False
'Rend impossible l'interuption de la macro par appui sur une touche
.Interactive = False
.EnableCancelKey = xlDisabled
'Rend inaccessible la commande du menu Outils/ Macro
.CommandBars(1).Controls(6).Controls(12).Enabled = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With

For Each CmdB In Application.CommandBars
CmdB.Enabled = False
Next CmdB

With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With

'Empêche l'acces au menu des macros
Application.OnKey "%{F8}", ""
'Empêche la fermeture par Alt F4
Application.OnKey "%{F4}", ""
Application.Interactive = True
End Sub
Avatar
Peponne31
Bonsoir Excel...lent,
Merci pour ta réponse, ça fonctionne à merveille.
Bon dimanche à vous tous
Peponne31
"Excel...lent" a écrit :

Salut Peponne,
Ci-dessous "un vrai plein écran"
Attention met bien les deux codes dans ThisWorkbook.
Le BeforClose remet l'environnement Excel au standard.
Le Workbook_Open s'occupe du plein écran !
Cordialement
Excel...lent


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim CmdB As CommandBar

With Application
.ScreenUpdating = False
.DisplayAlerts = False
'Réaffiche le Menu Outils, Macros
.CommandBars(1).Controls(6).Controls(12).Enabled = True
'Réaffiche la barre de formule
.DisplayFormulaBar = True
'Réaffiche la barre des status
.DisplayStatusBar = True
End With


For Each CmdB In Application.CommandBars
CmdB.Enabled = True
Next CmdB

With ActiveWindow
.DisplayGridlines = True
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
Application.DisplayFullScreen = False
Application.CommandBars("Standard").Visible = True
Application.CommandBars("Formatting").Visible = True
Application.Interactive = True
End Sub


Private Sub Workbook_Open()
'Exit Sub
Dim CmdB As CommandBar
Application.DisplayFullScreen = True

With Application
.ScreenUpdating = False
.DisplayAlerts = False
'Rend impossible l'interuption de la macro par appui sur une touche
.Interactive = False
.EnableCancelKey = xlDisabled
'Rend inaccessible la commande du menu Outils/ Macro
.CommandBars(1).Controls(6).Controls(12).Enabled = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With

For Each CmdB In Application.CommandBars
CmdB.Enabled = False
Next CmdB

With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With

'Empêche l'acces au menu des macros
Application.OnKey "%{F8}", ""
'Empêche la fermeture par Alt F4
Application.OnKey "%{F4}", ""
Application.Interactive = True
End Sub