Member already exists in an object module from which this object module derives

Bruno80

XLDnaute Nouveau
ERROR:Member already exists in an object module from which this object module derives

Bonjour,

j'ai testé cette frontière efficiente trouvé sur un ancien fil,

mais lorsque j'arrive prêt des boutons ( je ne clique pas )
je ne fais que passer prêt, et bien un msg d'erreur s'affiche à propos de la macro
Msg d'erreur:Member already exists in an object module from which this object module derives

Code et fichier excel:
Lien supprimé

Voici une partie du Code:

Private Function Sort(matrix() As Single, number As Long, indicator As Boolean)
'(matrix, size, min-max indicator)
'ascending as indicator = 0, decending as indicator = 1
Dim temp1 As Single, temp2 As Long
Dim i As Long, j As Long
ReDim index(number) As Long
For i = 1 To number
index(i) = i
Next i
For i = 2 To number
temp1 = matrix(i)
temp2 = index(i)
For j = i - 1 To 1 Step -1
If indicator = 0 Then
If matrix(j) <= temp1 Then
Exit For
End If
Else
If matrix(j) >= temp1 Then
Exit For
End If
End If
matrix(j + 1) = matrix(j)
index(j + 1) = index(j)
Next j
matrix(j + 1) = temp1
index(j + 1) = temp2
Next i
Sort = index(1)
End Function

Merci
 
Dernière édition:

vbacrumble

XLDnaute Accro
Re : Member already exists in an object module from which this object module derives

Re



C'est une fonction
Private Function

pas une Sub

Le classeur semble fonctionner
Il y a juste un problème avec le graphique.

A+
 
Dernière édition:
G

Guest

Guest
Re : Member already exists in an object module from which this object module derives

Bonjour le fil,

Peut-être qu'en changeant le nom de la fonction.
Par exemple : MySort(.....)
Sort existe en tant qu'instruction VBA Excel, ou peut-être est-elle dupliquée.

A +
 

Discussions similaires

Statistiques des forums

Discussions
312 294
Messages
2 086 896
Membres
103 404
dernier inscrit
sultan87