Page 1 sur 1

@Contains en LS

MessagePublié: 23 Août 2006 à 09:33
par Michael DELIQUE
Code : Tout sélectionner
Public Function Contains_LS (Byval wSource As String, Byval wTarget As String) As Integer
   
   On Error Goto ErreurHandle
   
   If wSource = "" Then
      Contains_LS = False
      Exit Function
   End If
   
   If wTarget = "" Then
      Contains_LS = False
      Exit Function
   End If
   
   If Instr(wSource,wTarget) = 0 Then
      Contains_LS = False
   Else
      Contains_LS= True
   End If
   
   Exit Function
ErreurHandle:
   Msgbox "("+Cstr(Getthreadinfo (1))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
   Contains_LS=  False
   Exit Function
End Function