1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
| Sub essai()
Dim D_1 As Date
Dim D_2 As Date
Dim X As Long
D_1 = [A1]
D_2 = [B1]
For X = D_1 To D_2
'1
TimerMS
Application.SendKeys Cells(((Weekday(X, 2) - 1) * 2) + 47, "F")
Application.SendKeys "{TAB}"
'2
TimerMS
Application.SendKeys Cells(((Weekday(X, 2) - 1) * 2) + 47, "G")
Application.SendKeys "{TAB}"
'3
TimerMS
Application.SendKeys Cells(((Weekday(X, 2) - 1) * 2) + 47, "H")
Application.SendKeys "{TAB}"
'4
TimerMS
Application.SendKeys "{TAB}"
'5
TimerMS
Application.SendKeys "{TAB}"
'6
TimerMS
Application.SendKeys Cells(((Weekday(X, 2) - 1) * 2) + 47, "I")
Application.SendKeys "{TAB}"
'7
TimerMS
Application.SendKeys "{TAB}"
'8
TimerMS
Application.SendKeys "{TAB}"
'9
TimerMS
Application.SendKeys "{TAB}"
'10
TimerMS
Application.SendKeys Cells(((Weekday(X, 2) - 1) * 2) + 48, "F")
Application.SendKeys "{TAB}"
'11
TimerMS
Application.SendKeys Cells(((Weekday(X, 2) - 1) * 2) + 48, "G")
Application.SendKeys "{TAB}"
'12
TimerMS
Application.SendKeys Cells(((Weekday(X, 2) - 1) * 2) + 48, "H")
Application.SendKeys "{TAB}"
If Weekday(X, 2) < 7 Then
'13
TimerMS
Application.SendKeys "{TAB}"
'14
TimerMS
Application.SendKeys "{TAB}"
'15
TimerMS
Application.SendKeys "{TAB}"
'16
TimerMS
Application.SendKeys "{TAB}"
'17
TimerMS
Application.SendKeys "{TAB}"
'18
TimerMS
Application.SendKeys "{TAB}"
End If
Next X
End Sub |
Partager