Algorithme qui ne fonctionne pas

jack2125 Messages postés 336 Date d'inscription jeudi 5 septembre 2019 Statut Membre Dernière intervention 26 avril 2024 - 27 févr. 2024 à 10:18
mamiemando Messages postés 33093 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 4 mai 2024 - 27 févr. 2024 à 14:53

bonjour a tous un premier algo Application.Calculation = xlCalculationAutomatic Application.Goto Reference:="temps" Sub combi() Range("a3:g118757").ClearContents x = 2 Range("L6") = Now Application.ScreenUpdating = False Application.Calculation = xlCalculationManual For a = 1 To 25 For b = a + 1 To 26 For c = b + 1 To 27 For d = c + 1 To 28 For e = d + 1 To 29 x = x + 1 somcombi = Cells(1, a) + Cells(1, b) + Cells(1, c) + Cells(1, d) + Cells(1, e) pairimpaircombi = Cells(1, a) Mod 2 + Cells(1, b) Mod 2 + Cells(1, c) Mod 2 + Cells(1, d) Mod 2 + Cells(1, e) Mod 2 Range("A" & x) = Cells(1, a) Range("B" & x) = Cells(1, b) Range("C" & x) = Cells(1, c) Range("D" & x) = Cells(1, d) Range("E" & x) = Cells(1, e) Range("F" & x) = somcombi Range("G" & x) = pairimpaircombi Next Next Next Next Next Range("L7") = Now Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub la durée du temps de calcul du temps de travail s'affiche bien heure de début et de fin du travail et temps mis pour calculer en L7 mon second algo Sub Sauvegarde() Application.DisplayAlerts = False If Len(Dir("C:\Users\jacques\Documents\jeux loto", vbDirectory)) > 0 Then ActiveWorkbook.SaveAs Filename:="C:\Users\jacques\Documents\jeux loto\" & ActiveWorkbook.Name, CreateBackup:=False End If If Len(Dir("g:\loto", vbDirectory)) > 0 Then ActiveWorkbook.SaveAs Filename:="G:\loto\" & ActiveWorkbook.Name, CreateBackup:=False End If If Len(Dir("E:\loto", vbDirectory)) > 0 Then ActiveWorkbook.SaveAs Filename:="E:\loto\" & ActiveWorkbook.Name, CreateBackup:=False End If If Len(Dir("F:\loto", vbDirectory)) > 0 Then ActiveWorkbook.SaveAs Filename:="F:\loto\" & ActiveWorkbook.Name, CreateBackup:=False End If ActiveWorkbook.SaveAs Filename:="C:\Users\jacques\onedrive\loto\jeux loto\ " & ActiveWorkbook.Name, CreateBackup:=False Range("N7") = Now Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub seul en L7 affiche l'heure de début L heure de fin et le temps ne s'affiche pas ou est l'erreur merci a tous

4 réponses

Panth33ra Messages postés 19397 Date d'inscription mercredi 8 juillet 2020 Statut Membre Dernière intervention 30 avril 2024 1 764
Modifié le 27 févr. 2024 à 10:23

Bonjour,

C'est trop désordonné ton explication !


0
jack2125 Messages postés 336 Date d'inscription jeudi 5 septembre 2019 Statut Membre Dernière intervention 26 avril 2024
27 févr. 2024 à 10:58

bonjour a tous un premier algo 

.....Next Next Next Next Next Range("L7") = Now Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub

la durée du temps de calcul du temps de travail s'affiche bien heure de début et de fin du travail et temps mis pour calculer en L7 mon second algo

.... CreateBackup:=False Range("N7") = Now Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub

seul en L7 affiche l'heure de début L heure de fin et le temps ne s'affiche pas ou est l'erreur merci a tous


0
yg_be Messages postés 22754 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 4 mai 2024 1 479
27 févr. 2024 à 12:06

bonjour, que contient N7?

0
mamiemando Messages postés 33093 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 4 mai 2024 7 751
27 févr. 2024 à 14:53

Bonjour,

@jack2125 StatutMembre

Peux-tu repartager ton extrait de code en suivant ce tutoriel et en nous précisant dans quel langage tu travailles ? Je corrigerai le message initial et le redirigerait dans le forum adéquat.

Bonne chance

0