Microsoft 365 temps de chargement

cmdavid

XLDnaute Occasionnel
Bonjour a tous,
j'ai un fichier excel avec un bouton avec une bande déroulante pour changer la date, lorsque je change la date, le fichier met 20 seconde pour se mettre jour!
quelle est la solution pour réduire se temps?
merci par avance pour votre aide
 

Lolote83

XLDnaute Barbatruc
Bonjour
Peut être ceci dans ta macro
VB:
Sub TaMacro()
    Application.ScreenUpdating = False
    Application.Calculation = xlManual      'Recalcul manuel
    
    '-----------------------------
    '                 TA MACRO ICI
    '-----------------------------
    
    Application.Calculation = xlAutomatic   'Recalcul automatique
    Application.ScreenUpdating = False
End Sub
@+ Lolote83
 

cmdavid

XLDnaute Occasionnel
merci pour la réponse, mais je ne sais pas comment faire?
ci-dessous la macro que j'utilise :

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [AT3,AT4:AW4]) Is Nothing Then Exit Sub
Dim etat As Boolean
With Application
.ScreenUpdating = False
.DisplayAlerts = False
etat = .AskToUpdateLinks
.AskToUpdateLinks = False
Workbooks.Open(ThisWorkbook.Path & "\a-mmg\MMG Raport TBS - BASE.xlsm").Close True
.AskToUpdateLinks = etat
End With
ThisWorkbook.Save
End Sub
 

Lolote83

XLDnaute Barbatruc
Voici ta macro en retour ou j'y ai simplement rajouté 3 petites lignes.
Pas du tout sur que cela change grand chose mais sait-on jamais ?
VB:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, [AT3,AT4:AW4]) Is Nothing Then Exit Sub
    Dim etat As Boolean
    With Application
        .ScreenUpdating = False
        .Calculation = xlManual
        .DisplayAlerts = False
        etat = .AskToUpdateLinks
        .AskToUpdateLinks = False
        Workbooks.Open(ThisWorkbook.Path & "\a-mmg\MMG Raport TBS - BASE.xlsm").Close True
        .AskToUpdateLinks = etat
        .Calculation = xlAutomatic
        .ScreenUpdating = True
    End With
    ThisWorkbook.Save
End Sub
@+ Lolote83
 

Statistiques des forums

Discussions
313 092
Messages
2 095 188
Membres
106 206
dernier inscrit
lstonge