Bonjour,
je voudrai ajouter à mon code existant (voir code ci-dessous), la fonction de calcul automatique du classeur.
Pour résumer, faire comme si j'appuyais sur F9 pour lancer un calcul auto des formules avant le lancement du reste de la macro...
Merci pour votre aide.
Sub attends()
Dim f As Integer
Dim Cellule As Range
Dim Plage_C As Range, Plage_D As Range
Heure_Actuelle = Timer
Randomize
Nb_Seconde = Int((2400 - 1200 + 1) * Rnd + 1200)
Do
If Not Time = "13:00:00" Then
If Int(Timer - Heure_Actuelle) Mod Nb_Seconde = 0 Then
f = FreeFile
Open "C:\30minutes.txt" For Output As #f
For Each Cellule In Range("A1:A9")
Print #f, Cellule.Text
Next
Close f
End If
Else
If Int(Timer - Heure_Actuelle) Mod Nb_Seconde = 0 Then
f = FreeFile
Open "C:\30minutes.txt" For Output As #f
For Each Cellule In Range("A1:A9")
Print #f, Cellule.Text
Next
Close f
End If
Set Plage_C = Range("L10:O14")
Set Plage_D = Range("L15:O19")
Plage_D.Value = Plage_C.Value
Set Plage_C = Nothing
Set Plage_D = Nothing
End If
DoEvents
Loop
End Sub