Microsoft 365 affichage bizarre à la fermeture de mon "usine à gaz"

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

Usine à gaz

XLDnaute Barbatruc
Bonjour à toutes et à tous 🙂

A la fermeture de mon fichier, j'ai un affichage bizarre lol 🙂
Je suis sur la feuille de mon classeur affichage normal :
1669198500925.png

Quand je ferme mon fichier, j'ai cette affichage :
(uniquement sur les 2 premières lignes les autres restant affichées normalement)
1669198553483.png

Voici mon code de fermeture :
VB:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.MoveAfterReturn = True
Application.EnableEvents = False
Application.ScreenUpdating = False
ActiveWindow.DisplayZeros = False

    Sheets("Repondeurs").Unprotect Password:="Krameri"
    Sheets("Repondeurs").Range("ac1") = ""
    ClearClipboard1

    ActiveWindow.DisplayHeadings = True
     With Application
    .MoveAfterReturn = True
    .MoveAfterReturnDirection = xlToRight
    Application.MoveAfterReturnDirection = xlToRight
    End With
    Trie_Appels

    With Application 'plein écran
    .WindowState = xlMaximized 'window max
    End With
    Application.Calculation = xlCalculationAutomatic
    Application.EnableEvents = False
    Application.ScreenUpdating = True
    Sheets("A Faire").Select
    ActiveWorkbook.Save
    If Workbooks.Count = 1 Then Application.Quit Else ThisWorkbook.Close
End Sub
Avez déjà rencontré ce "truc" ? lol 🙂
Ce n'est pas gênant et aucune influence sur le fichier et mes feuilles, tout fonctionne bien mais ça "m'énerve 😡" depuis très longtemps.

Merci pour vos retours
🙂
 
Dernière édition:
Bonsoir à tous,
Pour commencer il n'y as pas d'arrêt de calcul automatique au début
Ensuite, je ferais ceci
VB:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
  Application.MoveAfterReturn = True
  Application.EnableEvents = False
  Application.Calculation = xlCalculationManual
  ActiveWindow.DisplayZeros = False
 
  Application.ScreenUpdating = False
  Sheets("Repondeurs").Unprotect Password:="Krameri"
  Sheets("Repondeurs").Range("ac1") = ""
  ClearClipboard1

  Application.ScreenUpdating = False
  ActiveWindow.DisplayHeadings = True
  With Application
    .MoveAfterReturn = True
    .MoveAfterReturnDirection = xlToRight
    Application.MoveAfterReturnDirection = xlToRight
  End With
  Application.ScreenUpdating = False
  Trie_Appels

  With Application 'plein écran
    .WindowState = xlMaximized 'window max
  End With
  Application.Calculation = xlCalculationAutomatic
  Application.EnableEvents = False
  Sheets("A Faire").Select
  ActiveWorkbook.Save
  Application.ScreenUpdating = True
  If Workbooks.Count = 1 Then Application.Quit Else ThisWorkbook.Close
End Sub
A+
 
bSR Bruno 🙂
Merci d'être là toi aussi...
"Pour commencer il n'y as pas d'arrêt de calcul automatique au début"
Le fichier est ouvert en calcul manuel :
VB:
Private Sub Workbook_Open()
Worksheets("Repondeurs").Protect Password:="", UserInterfaceOnly:=True
Worksheets("RendezVous").Protect Password:="", UserInterfaceOnly:=True

    With ActiveWindow
    .WindowState = xlNormal
        Application.Left = 1
        Application.Top = 1
        Application.Width = 1000 'largeur 957
        Application.Height = 650 'hauteur
    End With
    
Application.MoveAfterReturn = True
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual

Ton code fonctionne bien et je t'en remercie 🙂
Mais le souci est tenace et s'accroche : Il demeure Grrr !
🙂
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
7
Affichages
1 K
Q
Réponses
0
Affichages
849
quent632
Q
N
Réponses
10
Affichages
2 K
N
N
  • Question Question
Réponses
5
Affichages
3 K
B
Réponses
2
Affichages
1 K
bonjourdoc
B
Retour