IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Macros et VBA Excel Discussion :

un probleme avec ma userform et recherche de donnée


Sujet :

Macros et VBA Excel

Mode arborescent

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Analyse système
    Inscrit en
    Juillet 2018
    Messages
    16
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Algérie

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Enseignement

    Informations forums :
    Inscription : Juillet 2018
    Messages : 16
    Par défaut un probleme avec ma userform et recherche de donnée
    bonjours
    j'ai un sheets qui aa comme tableaux :
    Pièce jointe 513355

    si je recherche le ID : 17/0001 ...... 17/0254 j'ais rien comme donnée
    mais si je recherche le id comme : 1 - 2 - 3 - 4 - .... - 10000
    ça marche tres bien

    le code de ma userform
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    Private Sub CommandButton1_Click()
    MsgBox "Merci pour utilisé UserForm"
    Unload Me
    End Sub
     
    Private Sub id_Change()
    X = WorksheetFunction.CountIf(sheet20.Range("a:a"), Val(Me.id.Value))
     
     
    With Me
    If .id.Value <> "" And X <> 0 Then
     
    .nar = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 2, 0)
    .prar = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 3, 0)
    .dateid = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 4, 0)
    .moy1 = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 5, 0)
    .moy2 = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 6, 0)
    .moy3 = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 7, 0)
    .moy4 = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 8, 0)
    .moy5 = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 9, 0)
    .moy6 = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 10, 0)
    .moyall = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 11, 0)
    .resultat = Application.WorksheetFunction.VLookup(CLng(Me.id.Value), sheet20.Range("lookup"), 12, 0)
     
    Else
     
    .nar = ""
    .prar = ""
    .dateid = ""
    .moy1 = ""
    .moy2 = ""
    .moy3 = ""
    .moy4 = ""
    .moy5 = ""
    .moy6 = ""
    .moyall = ""
    .resultat = ""
    End If
    End With
    End Sub
    mais ça marche pas !!!!!!
    Fichiers attachés Fichiers attachés

Discussions similaires

  1. [XL-2003] Création userform pour recherche de données dans un classeur
    Par matt-angel17 dans le forum Macros et VBA Excel
    Réponses: 13
    Dernier message: 02/08/2013, 10h41
  2. Probleme avec le formulaire de recherche (export excel)
    Par Legarraudien dans le forum IHM
    Réponses: 3
    Dernier message: 04/07/2008, 12h47
  3. Problemes avec la fonction de recherche sur sharepoint
    Par nico_pouchet dans le forum SharePoint
    Réponses: 3
    Dernier message: 29/11/2007, 17h10
  4. probleme avec des filtres de recherche sur des dates
    Par MCarole dans le forum Access
    Réponses: 2
    Dernier message: 24/07/2006, 10h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo