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

Usine à gaz

XLDnaute Barbatruc
Supporter XLD
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 :mad:" depuis très longtemps.

Merci pour vos retours
:)
 
Dernière édition:

Usine à gaz

XLDnaute Barbatruc
Supporter XLD
Ca dure combien de temps ? Un dixième de seconde, probablement même moins.
Et ça t'énerve ??? Ben... ferme les yeux pendant ce dixième de seconde...
ça peu rester comme ça tout le temps de la fermeture (4 à 5 secondes)
LOL : c'est bcp trop pour moi ;)
mais déjà, ce n'est pas normal et je n'arrive pas à comprendre pourquoi ça le fait ???
:)
 
C

Compte Supprimé 979

Guest
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+
 

Usine à gaz

XLDnaute Barbatruc
Supporter XLD
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 !
:)
 

Discussions similaires

Statistiques des forums

Discussions
311 723
Messages
2 081 932
Membres
101 844
dernier inscrit
pktla