arret d'une macro sans raison (enfin pour moi:D)

  • Initiateur de la discussion Initiateur de la discussion fifi
  • Date de début Date de début

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

fifi

XLDnaute Occasionnel
bonjour à tous,

qui peut me dire si il y a une raison pour que le code qui suit l'instruction suivante dans une macro événementielle ne soit pas executé?

Code:
Sheets("table").Range("table_plaqe_abi7900").Copy sheets("Exploitation_QPCR").Range("well").Offset(1, 0)


miciiii 😀
 
Re : arret d'une macro sans raison (enfin pour moi😀)

Bonjour

oui si tu as un code sur un worksheetchange de ton autre feuille (Exploitation_QPCR)

Dans ce cas là ce code se déclencherait au moment du collage et ensuite il faudrait voir ce qu'il y a dedans
 
Re : arret d'une macro sans raison (enfin pour moi😀)

euh difficile de mettre toute la macro 😀





Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'''''' ICI pas mal d'autre conditions évenementielles du genre ...If Not Application.Intersect(

'''''''''''''''sélection fichier à ouvrir''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Application.Intersect(Target, Range("Importation_QPCR")) Is Nothing Then
    '''le fichier à ouvrir en premier est le fichier table. le nom du fichier doit terminer par "_table" de même
    '''pour les autre fichier "_clipped", "_disso" , ...
    ''' l'ouverture de ces derniers fichier se fera automatiquement s'ils sont trouvé au même endroit que le fichier Table.
   Dim Chemin As String
   Dim ClasseurActif As String
   Dim TheFile As String
   Dim Table As String
   Dim Clipped As String
   Dim Disso As String
   Dim NomfichierTable As String
   Dim NomfichierClipped As String
   Dim NomfichierDisso As String
   Dim Adress_TXT As String
   Dim firstAddress As Variant
  
   
        If Target.Rows.Count > 1 Then Exit Sub
        If Target.Columns.Count > 1 Then Exit Sub
        '''définition variables
    Chemin = ThisWorkbook.Path
    ClasseurActif = ActiveWorkbook.Name
    
    '''demande du type de document a ouvrir : ABI; STRATAGENE

'''type d'appareil

'''test du type par défaut
'type_appareil_form.Controls.Name(Sheets("listes").Range("listes_qpcr_defaut")) = True

type_appareil_form.Show

    Sheets("Exploitation_QPCR").Range("R14:AF155").ClearContents  '''efface la base


If Sheets("listes").Range("listes_qpcr_choisie") = "CheckBox_applied" Then
    TheFile = Application.GetOpenFilename("Text Files (*.txt), *.txt") ' "Excel Files (*.txt), *.txt")
    If TheFile = "Faux" Then Exit Sub  'exit si annulation ouverture classeur

    Workbooks.Open FileName:=TheFile         '''ouverture du fichier table
    
    Table = ActiveWorkbook.Name  '''mise en mémoire du nom du fichier txt
    NomfichierTable = Left(Table, Len(Table) - 4)  'nom du fichier sans l'extension
    Adress_TXT = Workbooks(Table).Path  '''détermine l'adresse d'ouverture des fichiers
    Workbooks(ClasseurActif).Activate  '''retour sur le classeur actif
    
       ''''importation des données si plusieurs fichiers
    Clipped = Left(Table, Len(Table) - 9) & "clipped.txt"
    Disso = Left(Table, Len(Table) - 9) & "disso.txt"
    
     '''importation fichier clipped = courbes
    If Len(NomfichierTable) > 31 Then
        NomfichierTable = Left(NomfichierTable, 31)
    End If
    '''copy des données table
    Workbooks(Table).Sheets(NomfichierTable).Columns("A:F").Copy Workbooks(ClasseurActif).Sheets("table").Columns("A")
    Windows(Table).Close

    Workbooks(ClasseurActif).Sheets("Exploitation_QPCR").Range("Exploitation_nom_fichier") = Sheets("table").Cells(2, 2)
    ''''''''''''''
    
    '''clipped
    Workbooks.OpenText FileName:=Adress_TXT & "\" & Clipped, Origin:=xlMSDOS _
        , StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
        ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
        , Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
        Array(3, 1)), TrailingMinusNumbers:=True
                
    '''copy des données clipped
    NomfichierClipped = Left(Clipped, Len(Clipped) - 4)
    If Len(NomfichierClipped) > 31 Then
        NomfichierClipped = Left(NomfichierClipped, 31)
    End If
    Workbooks(Clipped).Sheets(NomfichierClipped).Columns("A:CV").Copy Workbooks(ClasseurActif).Sheets("clipped").Columns("A:CV")
    Windows(Clipped).Close
    
    Workbooks(ClasseurActif).Activate
    Sheets("Exploitation_QPCR").Select
    
    '''remplacement des séparateur décimaux
        Sheets("clipped").Cells.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
  
    '''importation fichier Disso
    Workbooks.OpenText FileName:=Adress_TXT & "\" & Disso, Origin:=xlMSDOS _
        , StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
        ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
        , Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
        Array(3, 1)), TrailingMinusNumbers:=True
    NomfichierDisso = Left(Disso, Len(Disso) - 4)
    If Len(NomfichierDisso) > 31 Then
        NomfichierDisso = Left(NomfichierDisso, 31)
    End If
    Workbooks(Disso).Sheets(NomfichierDisso).Columns("A:cv").Copy Workbooks(ClasseurActif).Sheets("Dissociation").Columns("A:cv")
    Windows(Disso).Close
    Workbooks(ClasseurActif).Activate
    

        '''format clipped
    Sheets("Clipped").Cells.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    
        '''format disso
    Sheets("Dissociation").Cells.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
         Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
   
        Application.Run "Ecriture_plaque_bactérie"
        Application.Run "Ecriture_plaque"

        Sheets("table").Range("table_plaqe_abi7900").Copy Sheets("Exploitation_QPCR").Range("well").Offset(1, 0)
        Sheets("Exploitation_QPCR").Range("well").Offset(1, 0) = Sheets("table").Range("table_plaqe_abi7900")

'''''ICI LA MACRO S'ARRETE
     
        Columns("D:O").EntireColumn.AutoFit
        Range("exploitation_find_Tneg").Select
        Range("Exploit_analyse_quantitative").Select
        Range("Exploit_CT_result").Calculate

end if
end sub
End If
 
Re : arret d'une macro sans raison (enfin pour moi😀)

ok , donc mon code colle une plage sur une plage qui déclanche une macro évenementielle. cela pourrait expliquer l'arret de la macro...

humm...comment je peux contourner le probleme ? c'est dommage que le vba ne finisse pas le code en cours pour seulement après prendre en compte les autres macro événementielles qui ont été déclanchées...
 
Re : arret d'une macro sans raison (enfin pour moi😀)

Bonjour,

La macro est une SelectionChange, et votre ligne avec Copy ne modifie pas la sélection, donc elle n'est pas à l'origine d'un éventuel bouclage.

Il faut bien sûr que les noms "table_plaqe_abi7900" et "well" soient bien définis dans les feuilles correspondantes, et que :
- soit "well" soit une cellule unique
- soit que les dimensions des plages soient identiques (en tout cas que celles de "well" soient compatibles).

A+
 
Re : arret d'une macro sans raison (enfin pour moi😀)

je viens justement de vérifier ces point et c'est OK.

j'ai mofier la méthode de "copier /coller" les données d'une plage à l'autre et cela marche mais c'est lent si le calculs ne sont pas désactivés.

Code:
I = 0
        For Each c In Sheets("table").Range("table_plaqe_abi7900")
            I = I + 1
            Sheets("Exploitation_QPCR").Range("exploitation_wells_table").Item(I) = Sheets("table").Range("table_plaqe_abi7900").Item(I)
        Next c
 
Re : arret d'une macro sans raison (enfin pour moi😀)

Salut Pascal,

Effectivement s'il y a une macro _Change dans la feuille de destination..

A+

Pardon Pascal, j'ai modifié mon post en même temps que ton message
 
Dernière édition:
Re : arret d'une macro sans raison (enfin pour moi😀)

si il y en a :/

pour ce cas je vais gérer mais du coup à chque fois que je veux faire executer une macro à l'intérieur de la macro événementielle, les macro "extérieures" ne sont pas executées.

c'est ennuyant :/


Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Cells(1, 1).Interior.ColorIndex = 35

On Error Resume Next


If Not Application.Intersect(Target, Range("Navigation")) Is Nothing Then
    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
    Navigateur.Show
    Cells(1, 1).Select
End If


''''''' modification valeur de témoins positif
If Not Application.Intersect(Target, Range("Exploitation_primer")) Is Nothing Then
    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
    If Target > Target.Offset(0, -1) Then Options_tpos_sample.Show

    'end if
End If


''''''''''modification des options du T positif
If Not Application.Intersect(Target, Range("T_plus_options")) Is Nothing Then
    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
    
    Tpos_options.Show
'''    Dim nbTposSupTneg As Integer
'''    Dim nbTposmanquant As Integer
'''    Dim nbEcartTnegTposinsuffisant As Integer
'''    Dim colonneTpos As Integer
'''    nbTposSupTneg = 0
'''    nbTposmanquant = 0
'''    nbEcartTnegTposinsuffisant = 0
'''    Dim Tpos As Integer
'''    Dim Tneg As Integer
'''    Dim ligne As Integer
'''    ''''controle des validité des témoins positifs
'''    For Each c In Sheets("listes").Range("listes_germes_détectés") ' .Count - 1 '50 = NB germes dispo
'''        If Len(c) > 2 Then 'présence du gène
'''        '''trouve la position du germes dans le liste
'''            'ligne = Application.WorksheetFunction.Match(c, Sheets("listes").Range("listes_primer"))  '''ligne du gène concerné
'''            'colonneTpos = Sheets("listes").Range("Listes_col_tpos").Column '''colonne des valeurs des T+
'''            Tpos = c.Offset(0, 1) 'Sheets("listes").Cells(ligne, colonneTpos)
'''            Tneg = c.Offset(0, 6) 'Sheets("listes").Cells(ligne, colonneTpos + 1)
'''            '''nombre de témoins invalides
'''            If Tpos > Tneg Then
'''                nbTposSupTneg = nbTposSupTneg + 1
'''                Tplusoption.Label1.Caption = "Nombre de témoin(s) positif(s) invalide(s): " & nbTposSupTneg
'''            End If
'''
'''            If Tpos = 0 Then
'''                nbTposmanquant = nbTposmanquant + 1
'''                Tplusoption.Label2.Caption = "Témoins positif(s) manquants: " & nbTposmanquant
'''            End If
'''
'''            If Tneg - Tpos < Sheets("listes").Range("Tpos_marge") Then
'''                nbEcartTnegTposinsuffisant = nbEcartTnegTposinsuffisant + 1
'''                Tplusoption.Label3.Caption = "Témoins positif(s) trop élevé(s): " & nbEcartTnegTposinsuffisant
'''            End If
'''        End If '''fin controle présence du gène
'''    Next c
'''    MsgBox Tplusoption.Activation_Tpos_control.Value
'''    Tplusoption.Show
    Tpos_options.Hide
Cells(1, 1).Select
End If

''''''''''''''''''make serial
'''''If Not Application.Intersect(Target, Range("Exploit_make_serial")) Is Nothing Then
'''''    If Target.Columns.Count <> 1 Then Exit Sub
'''''    If Target.Rows.Count <> 1 Then Exit Sub
'''''
'''''    If Target.Interior.ColorIndex = 35 Then '''make serial activé
'''''         Select_Serial.Show
'''''    Range("Exploit_make_serial").Interior.ColorIndex = 15
'''''    Else   '''make série non activé
'''''    Range("Exploit_make_serial").Interior.ColorIndex = 35
'''''        '''activation de make serial
'''''    End If
'''''
'''''    Range("Exploitation_tampon").Select
'''''    'ActiveChart.SeriesCollection(2).XValues = Selection 'Array(5, 7, 9, 11, 13, 15)
'''''End If
'''''
''''' ''''''''''''Checking plate'''''''''''''''''''''''''''''''''''''''
'''''If Not Application.Intersect(Target, Range("Exploitation_checking")) Is Nothing Then
'''''
'''''    If Target.Columns.Count <> 1 Then Exit Sub
'''''    If Target.Rows.Count <> 1 Then Exit Sub
'''''    Range("exploitation_find_Tneg").Select
'''''    Range("exploitation_disso_checking").Select
'''''    '''ajouter les cellules à cocher de vérification
'''''
'''''
'''''End If



    
''''' ''''''''''''DIAGNOSTIQUE PLATE'''''''''''''''''''''''''''''''''''''''
'''''If Not Application.Intersect(Target, Range("Exploitation_diagplate")) Is Nothing Then
'''''
'''''    If Target.Columns.Count <> 1 Then Exit Sub
'''''    If Target.Rows.Count <> 1 Then Exit Sub
'''''
'''''    Application.Run "'Dev  Exploitation_QPCR (16).xls'!diagnostic"
'''''End If

 ''''''''''''OPTIONS '''''''''''''''''''''''''''''''''''''''
If Not Application.Intersect(Target, Range("Exploitation_disso_options")) Is Nothing Then

    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
        '''affichage form en fonction affichage sur la feuille
            If Range("Exploitation_disso_options") = "Disso OFF" Then
                Dissociation_options.CheckBox2.Value = True
            Else
                Dissociation_options.CheckBox2.Value = False
            End If
            Dissociation_options.Show
    If Range("Exploitation_disso_options").Interior.ColorIndex = 3 Then
        '''information sur les erreurs de dissociation
            Dissociation_gestion_erreur.Show
    End If
 Cells(1, 1).Select
End If

If Not Application.Intersect(Target, Range("Exploitation_primers_options")) Is Nothing Then

    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
        Primers_options.Show
    If Range("Exploitation_primers_options").Interior.ColorIndex = 3 Then
        
        
        '''information sur les erreurs de dissociation
    End If
 
End If



'''''''''''''''choix des marqueurs dans exploitation
If Not Application.Intersect(Target, Range("Exploit_marqueur")) Is Nothing Then
Dim Marqueur_string As String
    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
        '''effacement des marqueurs
        For I = 1 To 5   '5 marqueurs maxi
            Marqueur.Controls("marqueur" & I) = ""
            Marqueur.Controls("marqueur" & I).BackColor = &HE0E0E0
            Marqueur.Controls("marqueur" & I).Visible = False
        Next I
        '''insciption des marqueurs
        
        For I = 1 To 5   '5 marqueurs maxi
            Marqueur_string = Sheets("listes").Range("liste_init_marqueur").Offset(I, 0)
            Marqueur.Controls("marqueur" & I) = Marqueur
            
            Select Case Marqueur_string
                Case "SYBR"
                    Marqueur.Controls("marqueur" & I).BackColor = &HC0FFC0
                Case "FAM"
                    Marqueur.Controls("marqueur" & I).BackColor = &HFFFFC0
                Case "VIC"
                    Marqueur.Controls("marqueur" & I).BackColor = &HC0C0FF
                Case "NED"
                    Marqueur.Controls("marqueur" & I).BackColor = &HC0C0FF
                Case "TAM"
                    Marqueur.Controls("marqueur" & I).BackColor = &HC0C0FF
            End Select
            Marqueur.Controls("marqueur" & I).Visible = False
        Next I
        Marqueur.Show
        Cells(1, 1).Select
End If

'''''''''''''''coloriage des cellules
If Not Application.Intersect(Target, Range("exploit_detection")) Is Nothing Then
    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
    
    

    'Application.Run "calc_OFF"
    '''stockage des info de départ
    Dim info1 As String
    Dim info2 As String
    info1 = Range("Result_intitulé_1")
    info2 = Range("Result_intitulé_2")

     '''clean
    Range("Exploit_c_inf_REF").ClearContents
    Range("Exploit_c_sup_REF").ClearContents
'    If Range("Exploit_c_sup_REF") = "" Then ''' pas de référence
'        MsgBox ("Aucune référence sélectionnées" & Chr(10) & "toutes Ct seront comparées à leur témoins réspectifs")
'    End If
    
    Range("Result_intitulé_2") = "Statut"
    Range("Result_intitulé_1") = "Echantillon"
    Calculate
    Run "réecriture_plaque"
    'Range("Exploit_CT_result").Interior.Font.ColorIndex = 1
    Range("Exploit_CT_result").Interior.ColorIndex = xlNone
    
        For Each c In Range("Exploit_CT_result")
            '''coloriage des positifs
            If c = Sheets("listes").Range("listes_txt_positif") Then
                c.Interior.ColorIndex = Range("Exploit_c_inf_REF").Interior.ColorIndex
                If Cells(c.Row, 256) = Cells(c.Row - 1, 256) Then c.Offset(-1, 0).Interior.ColorIndex = Range("Exploit_c_inf_REF").Interior.ColorIndex
            End If
            
            '''coloriage des négatifs
            If c = Sheets("listes").Range("listes_txt_négatif") Then
                c.Interior.ColorIndex = Range("Exploit_c_sup_REF").Interior.ColorIndex
                If Cells(c.Row, 256) = Cells(c.Row - 1, 256) Then c.Offset(-1, 0).Interior.ColorIndex = Range("Exploit_c_sup_REF").Interior.ColorIndex
            End If
            
            If c = "Invalide ?" Then
                c.Interior.ColorIndex = Range("Exploit_c_sup_REF").Interior.ColorIndex
                If Cells(c.Row, 256) = Cells(c.Row - 1, 256) Then c.Offset(-1, 0).Interior.ColorIndex = Range("Exploit_c_sup_REF").Interior.ColorIndex
            End If
            

            '''vide si 2 cellules vides
'            If c = "-" Or c = "" Then
'                 c.Font.ColorIndex = 2 'blanc
'                 c.Offset(-1, 0).Interior.ColorIndex = 2
'                 If Cells(c.Row, 256) = Cells(c.Row - 1, 256) Then c.Offset(-1, 0).Interior.ColorIndex = Range("Exploit_c_inf_REF").Interior.ColorIndex
'                 c.Interior.ColorIndex = 2
'                 If Cells(c.Row, 256) = Cells(c.Row - 1, 256) Then c.Offset(-1, 0).Interior.ColorIndex = 2
'             End If

        Next c

  Range("Result_intitulé_1") = info1
  Range("Result_intitulé_2") = info2

  Calculate
  Run "réecriture_plaque"
'''controle et avertissement

End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''find Tneg''''''''''''''''''''''''''''''''''''''''
If Not Application.Intersect(Target, Range("exploitation_find_Tneg")) Is Nothing Then

    If Target.Columns.Count <> 1 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
 ''''nettoyage de l'userform
        For I = 1 To 12   '12germes maxi
            '''Puits
            Tpos_form.Controls("Puit" & I) = ""
            '''primers
            Tpos_form.Controls("Tneg" & I) = ""
            Tpos_form.Controls("Tpos" & I) = ""
            '''détector
            Tpos_form.Controls("Tnegdetector" & I) = ""
            '''valeur Ct
            Tpos_form.Controls("Tnegval" & I) = ""
            Tpos_form.Controls("Tposval" & I) = ""
            '''controle validation
            Tpos_form.Controls("TnegValidate" & I).BackColor = &HE0E0E0
            '''numéro des puits
            Tpos_form.Controls("puit" & I).Visible = False
            Tpos_form.Controls("Tposval" & I).Visible = False
            Tpos_form.Controls("Tneg" & I).Visible = False
            Tpos_form.Controls("Tnegdetector" & I).Visible = False
            Tpos_form.Controls("Tposdetector" & I).Visible = False
            Tpos_form.Controls("Tnegval" & I).Visible = False
            Tpos_form.Controls("TnegValidate" & I).Visible = False


        Next I
   I = 0
   Dim Z As Integer
    Z = 0
   'recherche des CT dans la base à partir du nom de l'échantillon
    For Each c In Range("Exploitation_sample_liste") '''' recherche  dans la liste plutot que dans la plaque  pour faciliter la recherche d'autre critères

          If Left(c, 4) = "Tneg" Or Left(c, 4) = "tneg" Then
             If Right(c, 2) = "T+" Then GoTo dérivation_Tpos '''' dérivation pour ne pas exploiter les T+ en tneg
               I = I + 1
               Primer = Right(c, Len(c) - InStr(c, "_"))  '''noms primers
                Tpos_form.Controls("Tneg" & I) = Primer  '''type gène
                Tpos_form.Controls("Tneg" & I).Visible = True

                Tpos_form.Controls("Tnegdetector" & I) = c.Offset(0, 2) '''reporter
                Tpos_form.Controls("Tnegdetector" & I).Visible = True

        If c.Offset(0, 4) = "Undetermined" Then
                Tpos_form.Controls("Tnegval" & I) = 40
                Tpos_form.Controls("Tnegval" & I).Visible = True
        Else
                Tpos_form.Controls("Tnegval" & I) = Round(c.Offset(0, 4), 1) '''ct
                Tpos_form.Controls("Tnegval" & I).Visible = True
        End If

                Tpos_form.Controls("TnegValidate" & I).Visible = True
                Tpos_form.acceptabilité_Tneg.Caption = Sheets("listes").Range("Tneg_acceptabilité")
                
            '''control Tnégatif
            If c.Offset(0, 4) = "Undetermined" Or c.Offset(0, 4) > Sheets("listes").Range("Tneg_acceptabilité") Then
                'If c.Offset(0, 4) = "Undetermined" Then MsgBox "Undetermined"
                Tpos_form.Controls("Tposval" & I).BackColor = &HFF00&     '''vert
                Tpos_form.Controls("Tposval" & I).Caption = "OK"
                Tpos_form.Controls("TnegValidate" & I).BackColor = &HFF00&
            Else '''tneg non absent ou inférieur à la limite tolérée
                If Round(c.Offset(0, 4), 1) < Sheets("listes").Range("Tneg_acceptabilité") Then
                    Tpos_form.Controls("tnegval" & I).BackColor = &HFF&      '''rouge
                    Tpos_form.Controls("TnegValidate" & I).Caption = "OK"
                    Tpos_form.Controls("TnegValidate" & I).BackColor = &HFF&
                Else
                    Tpos_form.Controls("tnegval" & I).BackColor = &HFF00& '''rouge
                    Tpos_form.Controls("TnegValidate" & I).Caption = "KO"
                    Tpos_form.Controls("TnegValidate" & I).BackColor = &HFF00& '''rouge
                End If '''fin controle et comparaison tpos et tneg
            End If '''fin control négatif

        End If   '''fin test témoin négatif
dérivation_Tpos:
        Next c
        
     For Each c In Range("Exploitation_sample_liste") '''' recherche  dans la liste plutot que dans la plaque  pour faciliter la recherche d'autre critères
        If Left(c, 4) = "Tpos" Or Left(c, 4) = "Tinh" Or Left(c, 8) = "Tpositif" Or Left(c, 4) = "tpos" Or Right(c, 2) = "T+" Then
                'If c = "T+" Then MsgBox ("T+")
                Primer = Right(c, Len(c) - InStr(c, "_"))  '''noms primers
                '''trouve le numéro du control pour le germe concerné attribué lors de la détection du T-
                For Y = 1 To 12 '''boucle sur tous les primers
                    If Tpos_form.Controls("Tneg" & Y) = Primer Then
                        I = Y
                        GoTo finsearch
                    Else
                        I = I + 1
                        Z = 1
                        'MsgBox "Z " & z
                        GoTo finsearch
                    End If
                Next Y
finsearch:

'                Sheets("listes").Cells(11 + Y + I, Range("listes_germes_détectés").Column) = Primer

                Tpos_form.Controls("Tpos" & I) = Primer
                Tpos_form.Controls("Tpos" & I).Visible = True

                Tpos_form.Controls("Tposdetector" & I) = c.Offset(0, 2) '''reporter
                Tpos_form.Controls("Tposdetector" & I).Visible = True
                
                Tpos_form.Controls("Tposval" & I).Visible = True
                Tpos_form.Controls("TnegValidate" & I).Visible = True
                
        If c.Offset(0, 4) = "Undetermined" Then
                Tpos_form.Controls("Tposval" & I) = 40
                Tpos_form.Controls("TnegValidate" & I).BackColor = &HFF&  'rouge &HFF&
                Tpos_form.Controls("TnegValidate" & I).Caption = "KO"
        Else
                Tpos_form.Controls("Tposval" & I) = Round(c.Offset(0, 4), 1) '''ct
                Tpos_form.Controls("TnegValidate" & I).BackColor = &HFF00&  'vert
                Tpos_form.Controls("TnegValidate" & I).Caption = "OK"
        End If
        
        '''control Tpositif
''''''            If c.Offset(0, 4) = "Undetermined" Then '''erreur sur le T pos
''''''                Tpos_form.Controls("Tposval" & I).BackColor = &HFF& '''rouge
''''''            Else
''''''                Tpos_form.Controls("TnegValidate" & I).Visible = True
               Tpos_form.acceptabilité_Tpos.Caption = Sheets("listes").Range("Tpos_acceptabilité")
''''''                If Round(c.Offset(0, 4), 1) < Sheets("listes").Range("Tpos_acceptabilité") And Round(c.Offset(0, 4), 1) < Tpos_form.Controls("tnegval" & I) - Sheets("listes").Range("Tpos_marge") Then
''''''                    Tpos_form.Controls("Tposval" & I).BackColor = &HFF00&  '''vert
''''''                Else
''''''                    Tpos_form.Controls("Tposval" & I).BackColor = &HFF& '''rouge
''''''                End If
''''''            End If
           End If
       Next c
       
    ''''validation des 2 controles
    
    
''''    For I = 1 To 12
''''        If Tpos_form.Controls("Tposval" & I).BackColor = &HFF00& And Tpos_form.Controls("tnegval" & I).BackColor = &HFF00& Then
''''            Tpos_form.Controls("TnegValidate" & I).BackColor = &HFF00&  '''vert
''''        Else
''''            Tpos_form.Controls("TnegValidate" & I).BackColor = &HFF& '''rouge
''''        End If
''''
''''    Next I
    Tpos_form.Show
    Range("Exploitation_tampon").Select
  
    
End If
    
'''mise en référence si cellule ref activée = vert
If Range("ExploitationLoad_ref").Interior.ColorIndex = 36 Then
    Range("Result_intitulé_2") = Range("exploit_select_marker_liste")
    Range("ExploitationLoad_ref").Interior.ColorIndex = 15 'gris 'désactive la fonction selection
    Sheets("listes").Range("REF") = Target
    Calculate
    
   
    If IsNumeric(Target * 1) = True Then
        Range("ExploitationLoad_ref") = "Choisir référence " & Round(Target, 1)
        '''coloriage fct réf
        ''''boucle sur la couleur
        For Each c In Range("Exploit_CT_result")
                '''coloriage
                If IsNumeric(c) = False Then
    
                    If c.Offset(1, 0) * 1 < Sheets("listes").Range("REF") And c.Offset(1, 0) * 1 <> 0 Then              '''coloriage
                        color = Range("Exploit_c_inf_REF").Interior.ColorIndex
                    Else
                        color = Range("Exploit_c_sup_REF").Interior.ColorIndex
                    End If
                        c.Interior.ColorIndex = color
                        c.Offset(1, 0).Interior.ColorIndex = color
                End If
            '''vide si 2 cellules vides
            If c = "_" Then
                 '''font
                 c.Font.ColorIndex = 2 'blanc
                 '''fond
                 c.Interior.ColorIndex = 2
             End If
            If c = "" Then c.Interior.ColorIndex = 2
        Next c
    Else
        MsgBox ("la référence doit être une numéric!")
        GoTo fin
    End If '''fin controle de valeur numéric
    Range("Result_intitulé_2") = "Statut"
    Calculate
   Run "réecriture_plaque"
   Range("Exploitation_tampon").Select
        ''''''''''''''''''''
End If


'''''''''''protection de la plaque
If Not Application.Intersect(Target, Range("Exploit_CT_result")) Is Nothing Then
    'Dim txt As String
    'Range("Exploit_CT_result").ClearComments
    '''stocke les coordonnées du puit selectionné
    ligne = Cells(Target.Row, 256)
    colonne = Cells(13, Target.Column)
    answer = Sheets("listes").Range("Listes_qpcr_capacity") '''format plaque 96 ou 48

    Sheets("listes").Range("liste_well_selected") = (ligne - 1) * answer + colonne
    Range("G32:O32").FormulaR1C1 = "=OFFSET(well,MATCH(liste_well_selected,R14C18:R109C18,0),MATCH(Exploitation_QPCR!R31C,Exploitation_QPCR!R13C18:R13C50,0)-1)"
    'Range("Exploitation_données_selection").Calculate
    
    For Each c In Range("Exploitation_données_selection")
        If IsError(c) = True Then c = ""
        If IsNumeric(c * 1) = True Then
            c = Round(c, 0)
        End If
    Next c

    Sheets("Graphiques").Range("Graph_sample_selected") = Cells((ligne - 1) * answer + colonne + 13, Sheets("Exploitation_QPCR").Range("Exploitation_sample_name_col").Column)
    
    Range("G32:O32").Copy
    Range("G32:O32").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
        

    If Range("ExploitationLoad_ref").Interior.ColorIndex <> 36 Then Cells(1, 1).Select
End If

''' selection de la case réf
   If Not Application.Intersect(Target, Range("ExploitationLoad_ref")) Is Nothing Then
    If Target.Columns.Count <> 2 Then Exit Sub
    If Target.Rows.Count <> 1 Then Exit Sub
    
    Range("ExploitationLoad_ref").Interior.ColorIndex = 15 'gris
test_valeur:
     Choixref = MsgBox("Selection d'un puit référence : ", vbYesNo, "Référence relative")
     
     If Choixref = 6 Then   '6 = yes , 7  = no   'REF
        '''affichage des CT
        Range("Result_intitulé_1") = "Sample Name"
        Range("Result_intitulé_2") = "Ct"
        Calculate
        Run "réecriture_plaque"
        Range("ExploitationLoad_ref").Interior.ColorIndex = 36 '35  'vert activé en attente de clic sur plaque ^pour définir une valuer seuil
        Exit Sub
     End If
        Range("ExploitationLoad_ref").Interior.ColorIndex = 15
    End If


''''''''''''''''format plaque
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    If Not Application.Intersect(Target, Range("Exploit_analyse_quantitative")) Is Nothing Then    'range("Format_qpcr")
            If Target.Columns.Count <> 1 Then Exit Sub
            If Target.Rows.Count <> 1 Then Exit Sub
    Range("Result_intitulé_1") = "Nom échantillon"
    Range("Result_intitulé_2") = Range("exploit_select_marker_liste") '''travail sur les ct du fluorophore sélectionné
    Calculate

    Application.Run "Ecriture_plaque"


    Range("Exploit_CT_result").Interior.ColorIndex = xlNone
    Columns("AI:AT").EntireColumn.AutoFit
    '''remise à zéro des couleurs
    
    With Range("Exploit_CT_result")
        .Interior.ColorIndex = xlNone
        .Font.ColorIndex = 1
    End With

    ''''boucle sur la couleur
    For Each c In Range("Exploit_CT_result")
        '''coloriage
        If IsNumeric(c * 1) = False Then
            '''détermine la couleur
            'color = ligne décalage pour trouver la couleur du ct
            color = Application.WorksheetFunction.Match(Round(c.Offset(1, 0), 0), Sheets("listes").Range("listes_Gamme_colorée_up"))
            color = Sheets("listes").Range("Liste_pas_gamme_colorée").Offset(color, 0).Interior.ColorIndex '''test de couleur : si color = noir alors écriture blanche
            '''coloriage
            c.Interior.ColorIndex = color
            c.Offset(1, 0).Interior.ColorIndex = color
            If Cells(c.Row, 256) = Cells(c.Row - 1, 256) Then c.Interior.ColorIndex = color
        End If
    '''vide si 2 cellules vides
        If c = "_" Then
             '''font
             c.Font.ColorIndex = 2 'blanc
             '''fond
             c.Interior.ColorIndex = 2
         End If
        If c = "Undetermined" Then
            c.Interior.ColorIndex = 4
            c.Offset(-1, 0).Interior.ColorIndex = 4
        End If
    
    Next c

    Range("Exploit_CT_result").Copy
    Range("Exploit_CT_result").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
    Range("Exploitation_tampon").Select
    
End If



'
''''''''''''''''''Choix affichage plaque 1'''''''''''''''''''''''
If Not Application.Intersect(Target, Range("Result_intitulé_1")) Is Nothing Then
'''''''''''''''''''''''choix onglet'''''''''''''''''
    User_choix_plaque.Show

    Sheets("Exploitation_QPCR").Range("Result_intitulé_1") = Sheets("listes").Range("listes_bouton_actif")
    Application.Run "Ecriture_plaque"
    Range("Result_intitulé_1").Interior.ColorIndex = 15
    Range("Exploit_CT_result").Calculate
End If
'
''''''''''''''''''Choix affichage plaque 2'''''''''''''''''''''''
If Not Application.Intersect(Target, Range("Result_intitulé_2")) Is Nothing Then
    User_choix_plaque.Show
    Sheets("Exploitation_QPCR").Range("Result_intitulé_2") = Sheets("listes").Range("listes_bouton_actif")
    Application.Run "Ecriture_plaque"
    Range("Result_intitulé_2").Interior.ColorIndex = 15
    Range("Exploit_CT_result").Calculate
End If


'''''''''''''''sélection fichier à ouvrir''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Application.Intersect(Target, Range("Importation_QPCR")) Is Nothing Then
    '''le fichier à ouvrir en premier est le fichier table. le nom du fichier doit terminer par "_table" de même
    '''pour les autre fichier "_clipped", "_disso" , ...
    ''' l'ouverture de ces derniers fichier se fera automatiquement s'ils sont trouvé au même endroit que le fichier Table.
   Dim Chemin As String
   Dim ClasseurActif As String
   Dim TheFile As String
   Dim Table As String
   Dim Clipped As String
   Dim Disso As String
   Dim NomfichierTable As String
   Dim NomfichierClipped As String
   Dim NomfichierDisso As String
   Dim Adress_TXT As String
   Dim firstAddress As Variant
  
   
        If Target.Rows.Count > 1 Then Exit Sub
        If Target.Columns.Count > 1 Then Exit Sub
        '''définition variables
    Chemin = ThisWorkbook.Path
    ClasseurActif = ActiveWorkbook.Name
    
    '''demande du type de document a ouvrir : ABI; STRATAGENE

'''type d'appareil
'''test du type par défaut
'type_appareil_form.Controls.Name(Sheets("listes").Range("listes_qpcr_defaut")) = True

type_appareil_form.Show
    If Sheets("listes").Range("Listes_temp") = "exit" Then
        Sheets("listes").Range("Listes_temp") = ""
        Exit Sub
    End If
    
    Sheets("Exploitation_QPCR").Range("R14:AF155").ClearContents  '''efface la base



If Sheets("listes").Range("listes_qpcr_choisie") = "CheckBox_applied" Then
    TheFile = Application.GetOpenFilename("Text Files (*.txt), *.txt") ' "Excel Files (*.txt), *.txt")
    If TheFile = "Faux" Then Exit Sub  'exit si annulation ouverture classeur
    If Sheets("listes").Range("Listes_temp") = "exit" Then
        Sheets("listes").Range("Listes_temp") = ""
        Exit Sub
    End If
    
    Workbooks.Open FileName:=TheFile         '''ouverture du fichier table
    Table = ActiveWorkbook.Name  '''mise en mémoire du nom du fichier txt
    NomfichierTable = Left(Table, Len(Table) - 4)  'nom du fichier sans l'extension
    Adress_TXT = Workbooks(Table).Path  '''détermine l'adresse d'ouverture des fichiers
    Workbooks(ClasseurActif).Activate  '''retour sur le classeur actif
    
       ''''importation des données si plusieurs fichiers
    Clipped = Left(Table, Len(Table) - 9) & "clipped.txt"
    Disso = Left(Table, Len(Table) - 9) & "disso.txt"
    
     '''importation fichier clipped = courbes
    If Len(NomfichierTable) > 31 Then
        NomfichierTable = Left(NomfichierTable, 31)
    End If
    '''copy des données table
    Workbooks(Table).Sheets(NomfichierTable).Columns("A:F").Copy Workbooks(ClasseurActif).Sheets("table").Columns("A")
    Windows(Table).Close

    Workbooks(ClasseurActif).Sheets("Exploitation_QPCR").Range("Exploitation_nom_fichier") = Sheets("table").Cells(2, 2)
    ''''''''''''''
    
    '''clipped
    Workbooks.OpenText FileName:=Adress_TXT & "\" & Clipped, Origin:=xlMSDOS _
        , StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
        ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
        , Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
        Array(3, 1)), TrailingMinusNumbers:=True
                
    '''copy des données clipped
    NomfichierClipped = Left(Clipped, Len(Clipped) - 4)
    If Len(NomfichierClipped) > 31 Then
        NomfichierClipped = Left(NomfichierClipped, 31)
    End If
    Workbooks(Clipped).Sheets(NomfichierClipped).Columns("A:CV").Copy Workbooks(ClasseurActif).Sheets("clipped").Columns("A:CV")
    Windows(Clipped).Close
    
    Workbooks(ClasseurActif).Activate
    Sheets("Exploitation_QPCR").Select
    
    '''remplacement des séparateur décimaux
        Sheets("clipped").Cells.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
  
    '''importation fichier Disso
    Workbooks.OpenText FileName:=Adress_TXT & "\" & Disso, Origin:=xlMSDOS _
        , StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
        ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False _
        , Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
        Array(3, 1)), TrailingMinusNumbers:=True
    NomfichierDisso = Left(Disso, Len(Disso) - 4)
    If Len(NomfichierDisso) > 31 Then
        NomfichierDisso = Left(NomfichierDisso, 31)
    End If
    Workbooks(Disso).Sheets(NomfichierDisso).Columns("A:cv").Copy Workbooks(ClasseurActif).Sheets("Dissociation").Columns("A:cv")
    Windows(Disso).Close
    Workbooks(ClasseurActif).Activate
    

        '''format clipped
    Sheets("Clipped").Cells.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
    
        '''format disso
    Sheets("Dissociation").Cells.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
         Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
       '''format''''''''''''''''''''''''''''''''''''''''''''
   Sheets("table").Range("table_plaqe_abi7900").Borders(xlDiagonalDown).LineStyle = xlNone
   Sheets("table").Range("table_plaqe_abi7900").Borders(xlDiagonalUp).LineStyle = xlNone
   
   
    With Sheets("table").Range("table_plaqe_abi7900").Font
        .Name = "Arial"
        .Size = 12
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
    Sheets("table").Range("table_plaqe_abi7900").Borders(xlDiagonalDown).LineStyle = xlNone
    Sheets("table").Range("table_plaqe_abi7900").Borders(xlDiagonalUp).LineStyle = xlNone
    With Sheets("table").Range("table_plaqe_abi7900").Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With Sheets("table").Range("table_plaqe_abi7900").Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With Sheets("table").Range("table_plaqe_abi7900").Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With Sheets("table").Range("table_plaqe_abi7900").Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With Sheets("table").Range("table_plaqe_abi7900").Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With Sheets("table").Range("table_plaqe_abi7900").Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
    End With
    With Sheets("table").Range("table_plaqe_abi7900")
        .HorizontalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
        Application.Run "Ecriture_plaque_bactérie"
        Application.Run "Ecriture_plaque"
        I = 0
        For Each c In Sheets("table").Range("table_plaqe_abi7900")
            I = I + 1
            Sheets("Exploitation_QPCR").Range("exploitation_wells_table").Item(I) = Sheets("table").Range("table_plaqe_abi7900").Item(I)
        Next c
        
        
        'Sheets("table").Range("table_plaqe_abi7900").Copy Sheets("Exploitation_QPCR").Range("well").Offset(1, 0)
             
        Columns("D:O").EntireColumn.AutoFit
        '''Range("Exploit_analyse_quantitative").Select
            Range("Result_intitulé_1") = "Nom échantillon"
    Range("Result_intitulé_2") = Range("exploit_select_marker_liste") '''travail sur les ct du fluorophore sélectionné
    Calculate

    Application.Run "Ecriture_plaque"

    Range("Exploit_CT_result").Interior.ColorIndex = xlNone
    Columns("AI:AT").EntireColumn.AutoFit
    '''remise à zéro des couleurs
    
    With Range("Exploit_CT_result")
        .Interior.ColorIndex = xlNone
        .Font.ColorIndex = 1
    End With

    ''''boucle sur la couleur
    For Each c In Range("Exploit_CT_result")
        '''coloriage
        If IsNumeric(c * 1) = False Then
            '''détermine la couleur
            'color = ligne décalage pour trouver la couleur du ct
            color = Application.WorksheetFunction.Match(Round(c.Offset(1, 0), 0), Sheets("listes").Range("listes_Gamme_colorée_up"))
            color = Sheets("listes").Range("Liste_pas_gamme_colorée").Offset(color, 0).Interior.ColorIndex '''test de couleur : si color = noir alors écriture blanche
            '''coloriage
            c.Interior.ColorIndex = color
            c.Offset(1, 0).Interior.ColorIndex = color
            If Cells(c.Row, 256) = Cells(c.Row - 1, 256) Then c.Interior.ColorIndex = color
        End If
    '''vide si 2 cellules vides
        If c = "_" Then
             '''font
             c.Font.ColorIndex = 2 'blanc
             '''fond
             c.Interior.ColorIndex = 2
         End If
        If c = "Undetermined" Then
            c.Interior.ColorIndex = 4
            c.Offset(-1, 0).Interior.ColorIndex = 4
        End If
    Next c

    For Each c In Range("Exploit_CT_result")
        Range("Exploit_CT_result") = Range("Exploit_CT_result").Value
    Next c
        
        '''
        Range("Exploit_CT_result").Calculate
        Range("exploitation_find_Tneg").Select

    GoTo finOuverture
    
End If


finOuverture:
        Application.Run "Ecriture_plaque_bactérie"
        Application.Run "Ecriture_plaque"
        Columns("D:O").EntireColumn.AutoFit
        Range("exploitation_find_Tneg").Select
        Range("Exploit_analyse_quantitative").Select
        
End If


'''ouverture d'un plan de plaque manuellement
If Not Application.Intersect(Target, Range("Load_plan")) Is Nothing Then
ouverture_plan_plaque:
    If Target.Rows.Count <> 1 Then Exit Sub
    If Target.Columns.Count <> 1 Then Exit Sub
    Application.Run "ouverture_plate_plan"
    Cells(1, 1).Select
End If


''''''''''''''SVGD plate résultats
'''''''''''''''''''''''''''SVGD'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Application.Intersect(Target, Range("Exploit_SVGD_plate")) Is Nothing Then
        If Target.Rows.Count <> 1 Then Exit Sub
        If Target.Columns.Count <> 1 Then Exit Sub
    On Error Resume Next '' pour éviter l'errur en recherche de fichier
    nomclasseur_en_cour = ActiveWorkbook.Name '''pour revenir sur le classeur après sauvegarde nouveau classeur
    '''nom de sauvegarde = Ext_numplate_date
    SVGD_name = Range("nom_gamme") & ".xls"
  '''sauvegarde sur serveur par défaut, si pas
    Dim FichierExiste As String

n = Cells(65536, 1).End(xlUp).Row + 1
    Sheets("Exploitation_QPCR").Range("A12:AF107").Copy 'Sheets("BD").Cells(n, 1) '.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks :=False, Transpose:=False
    Sheets("BD").Cells(n, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("Exploitation_QPCR").Select
End If
fin:
    Cells(1, 1).Select
    Columns("D:H").EntireColumn.AutoFit
Application.ScreenUpdating = True
'Set VariableObjet = Nothing
End
End Sub
 
Re : arret d'une macro sans raison (enfin pour moi😀)

Bonjour à tous

De Fifi
pour ce cas je vais gérer mais du coup à chque fois que je veux faire executer une macro à l'intérieur de la macro événementielle, les macro "extérieures" ne sont pas executées.

Peut-être un problème de conception (le genre de post qui me saoule!!)
 
Re : arret d'une macro sans raison (enfin pour moi😀)

Re,

Un détail, mais puisque vous ne copiez que les valeurs, essayez :

Code:
Application.EnableEvents = False
Sheets("Exploitation_QPCR").Range("well").Offset(1, 0).Value = Sheets("table").Range("table_plaqe_abi7900").Value
Application.EnableEvents = True

A+
 
Re : arret d'une macro sans raison (enfin pour moi😀)

merci en tout cas MJ13, ca va servir.

quand à la concption du classeur :/ ba on peut toujours tout faire nikel, ni penser à tout dés le début. j'y travail.

merci pour tout.
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Réponses
4
Affichages
588
Retour