VBA programme ne fait rien

Résolu/Fermé
hedi - Modifié par pijaku le 6/12/2013 à 11:40
 hedi - 18 déc. 2013 à 16:22
Bonjour, ce matin mon programme marchait mais maitenant il ne marche plus, le voici. Merci pour votre aide !

Sub REMPLISSAGEbase()

For i = 2 To 360
    For j = 3 To 759
        If Range("D" & i).Value = "Film" And Range("F" & i).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("C" & j).Value Then Workbooks("BASEc.xlsx").Sheets(1).Range("BQ" & j).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("BQ" & j).Text & vbCrLf & " Film: " & Range("C" & i).Value & " " & Range("I" & i).Value & " " & Range("J" & i).Value & " Original:" & Range("L" & i).Value & " French:" & Range("M" & i).Value & " " & Range("Q" & i).Value & " " & Range("R" & i).Value
    Next
Next

For i = 2 To 360
    For j = 3 To 759
        If Range("D" & i).Value = "Trailer" And Range("F" & i).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("C" & j).Value Then Workbooks("BASEc.xlsx").Sheets(1).Range("BQ" & j).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("BQ" & j).Text & vbCrLf & " BA: " & Range("C" & i).Value & " " & Range("I" & i).Value & " " & Range("J" & i).Value & " Original:" & Range("L" & i).Value & " French:" & Range("M" & i).Value & " " & Range("Q" & i).Value & " " & Range("R" & i).Value
    Next
Next

For i = 2 To 360
    For j = 3 To 759
        If Range("D" & i).Value = "Bonus" And Range("F" & i).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("C" & j).Value Then Workbooks("BASEc.xlsx").Sheets(1).Range("BQ" & j).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("BQ" & j).Text & vbCrLf & " Bonus: " & Range("C" & i).Value & " " & Range("I" & i).Value & " " & Range("J" & i).Value & " Original:" & Range("L" & i).Value & " French:" & Range("M" & i).Value & " " & Range("Q" & i).Value & " " & Range("R" & i).Value
    Next
Next

Dim k As Integer
For i = 2 To 360
    k = 0
    For j = 3 To 759
        If Range("F" & i).Value <> Workbooks("BASEc.xlsx").Sheets(1).Range("C" & j).Value Then k = k + 1
    Next
    If k = 757 Then Range("F" & i).Interior.Color = RGB(255, 0, 0)
Next

For i = 2 To 360
    For j = 3 To 759
        If Range("F" & i).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("C" & j).Value And Range("R" & i) Like "*1920*" Then Workbooks("BASEc.xlsx").Sheets(1).Range("BP" & j).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("BP" & j).Text & vbCrLf & Range("D" & i).Value & ": " & "HD"
If Range("F" & i).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("C" & j).Value And Range("R" & i) Like "*720*" Then Workbooks("BASEc.xlsx").Sheets(1).Range("BP" & j).Value = Workbooks("BASEc.xlsx").Sheets(1).Range("BP" & j).Text & vbCrLf & Range("D" & i).Value & ": " & "SD"
    Next
Next

End Sub

5 réponses

lermite222 Messages postés 8702 Date d'inscription dimanche 8 avril 2007 Statut Contributeur Dernière intervention 22 janvier 2020 1 190
4 déc. 2013 à 15:35
Bonjour,
1°) Quand tu poste du code il doit être indenté et tu dois le baliser comme code, le sélectionner et clic sur le bouton <> juste au dessus de l'éditeur.
2°) Avant que je n'examine tout ton code... il n'a aucune raison que ça marche au matin et plus deux heurs après. Tu DOIS avoir modifier quelque chose.. réfléchis.
Tu dis.
A+
1
magic, cette fois il a marché, sans rien changer.

Merci
1
Polux31 Messages postés 6917 Date d'inscription mardi 25 septembre 2007 Statut Membre Dernière intervention 1 novembre 2016 1 204
4 déc. 2013 à 17:19
Maléfique Magiciel a du encore frapper !!! ^^
1
lermite222 Messages postés 8702 Date d'inscription dimanche 8 avril 2007 Statut Contributeur Dernière intervention 22 janvier 2020 1 190
Modifié par lermite222 le 4/12/2013 à 18:00
Salut polux,
Mais non, mais non, une entité supérieure à bien voulu l'aider, eh oui, ça existe (les entités supérieurs). :-) parenthèse fermente x 10
A+
Si tu te cognes à un pot et que ça sonne creux, c'est pas forcément le pot qui est vide. ;-)(Confucius)
Note: Je ne répond pas aux MP pour les questions techniques. Et ma boule de cristal est calut Polux,
Mais non, mais non...ssée .
1
Polux31 Messages postés 6917 Date d'inscription mardi 25 septembre 2007 Statut Membre Dernière intervention 1 novembre 2016 1 204
4 déc. 2013 à 17:43
Salut lermite,

Ca c'est les gentils ... qui se manifestent que trop rarement lors des réunions d'avancement de projet ... ^^
0
merci pour vos reponses.
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
en passant, ca m'a fait la meme chose, au fait le programme ne se lance simplement pas je pense, ca fait execution en cours (et quelque fois "ne repond pas") puis ca fait rien. je relance et ca marche.

voila, bye !
0