Ceci est une page optimisée pour les mobiles. Cliquez sur ce texte pour afficher la vraie page.

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 :

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

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:
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

Les cookies sont requis pour utiliser ce site. Vous devez les accepter pour continuer à utiliser le site. En savoir plus…