Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2909 connectés 

  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  pb de champ résolu

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

pb de champ résolu

n°1363549
GillooZ
un reportage de filip loulou
Posté le 10-05-2006 à 16:29:28  profilanswer
 

DateDebut = DateValue(ListDateDebut.Value)
DateFin = DateValue(ListDateFin.Value)
 
If (DateDebut > DateFin) Then
    MsgBox "Choix de dates non conforme"
    OptionButtonPPM = False
    Exit Sub
End If
 
With Worksheets("enr_incidents" )
    DateTmp = CDate(.Range("A3" ))
    Do
        DateLue = CDate(.Range("A" & cpt))
        If (DateLue < DateDebut) Or (DateLue > DateFin) Then
            Exit Sub
        Else
            If (Day(DateTmp) = 24) And ((Month(DateTmp) = 4) Or (Month(DateTmp) = 6) Or (Month(DateTmp) = 9) Or (Month(DateTmp) = 11)) Then
                DateTmpz = DateSerial(Year(DateTmp), Month(DateTmp) + 1, 1)
            ElseIf (Day(DateTmp) = 25) And ((Month(DateTmp) = 1) Or (Month(DateTmp) = 3) Or (Month(DateTmp) = 5) Or (Month(DateTmp) = 7) Or (Month(DateTmp) = 8) Or (Month(DateTmp) = 10) Or (Month(DateTmp) = 12)) Then
                DateTmpz = DateSerial(Year(DateTmp), Month(DateTmp) + 1, 1)
            ElseIf (Month(DateTmp) = 2) And (Year(DateTmp) / 4 = 0) And (Day(DateTmp) = 23) Then
                DateTmpz = DateSerial(Year(DateTmp), 3, 1)
            ElseIf (Month(DateTmp) = 2) And (Year(DateTmp) / 4 <> 0) And (Day(DateTmp) = 22) Then
                DateTmpz = DateSerial(Year(DateTmp), 3, 1)
            Else
                DateTmpz = DateSerial(Year(DateTmp), Month(DateTmp), Day(DateTmp) + 7)
            End If
            For cptList = 0 To ListCli.ListCount - 1
                If ListCli.Selected(cptList) Then
                    Cli = ListCli.Column(0, cptList)
                    If (.Range("B" & cpt).Value = Cli) Then
                        tmp = .Range("T" & cpt).Value * 1000000 / Deno
                        .Range("Y" & cptt).Value = tmp
                        cptt = cptt + 1
                        semaine = semaine + tmp
                        mois = mois + tmp
                        troisMois = troisMois + tmp
                        sixMois = sixMois + tmp
                        If (DateLue >= DateTmpz) Then
                            .Range("AB" & cptSemaine).Value = semaine
                            cptSemaine = cptSemaine + 1
                            semaine = 0
                            DateTmp = DateLue
                        End If
                    End If
                End If
            Next cptList
            cpt = cpt + 1
        End If
    Loop Until IsEmpty(.Range("T" & cpt))
End With
 
j'aimerai stocker en fait dans ma colonne AB les informations a la semaine, pour avoir des données me permettant de faire un graphique avec echelle a la semaine mais dans ma colonne j'ai k'une seule valeur ki somme ttes celles de la colonne Y als k'il devrai y en avoir plusieurs (une par semaine)
 
voila dsl pr le texte, je verrai les reponses demain si yen a car kje kitte le taf :)
 
bon courage a tous


Message édité par GillooZ le 11-05-2006 à 09:37:27
mood
Publicité
Posté le 10-05-2006 à 16:29:28  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  VB/VBA/VBS

  pb de champ résolu

 

Sujets relatifs
utilisation champ listbox avec multiselected résoluprobleme avec champ date résolu
resolu :donner la valeur d'une var de sess à un champ caché ds un form[RESOLU] problème champ floatval en SQL
[php] [resolu]newbie. Comment ramener le focus sur le 1er champrécupérer un date via formulaire et l'insérer ds champ date [RESOLU]
(Résolu) - Caractères acceptés dans un champ par MySQL[résolu]Champ de type Oui/Non
[Résolu] Séparateur de champ format CSV[Résolu] Insérer dans un champ texte en fonction de checkbox
Plus de sujets relatifs à : pb de champ résolu


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR