Bonjour a tous,
novice dans la programmation , je met un programme dessous ou je souhaite qu'il ouvre un classeur "essai loto" et je n'arrive pas a le modifié pour que lorsqu'il écrit les lignes quand il arrive a la ligne 65530 d'Excel je souhaite qu'il continu a écrire dans la colone b puis c et etc...
Voila si quelqu'un peu m'aider ?
merci a tous.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 Sub loto() Dim chiffre(4) As Integer Dim z As Double Dim i, j, k, l, m As Integer z = 0 Open "essai loto.xls" For Output As #1 For i = 1 To 45 For j = i + 1 To 46 For k = j + 1 To 47 For l = k + 1 To 48 For m = l + 1 To 49 chiffre(0) = i chiffre(1) = j chiffre(2) = k chiffre(3) = l chiffre(4) = m Print #1, chiffre(0); "."; chiffre(1); "."; chiffre(2); "."; chiffre(3); "."; chiffre(4) z = z + 1 If z < 65530 Then ActiveCell.Offset(0, 1).Select Else ActiveCell.Offset(-65530, 1).Select z = 1 End If Next Next Next Next Next End Sub
Partager