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

VBA Access Discussion :

Import données Excel dans Form Access


Sujet :

VBA Access

  1. #1
    Membre habitué Avatar de berti
    Profil pro
    Inscrit en
    Août 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 239
    Points : 175
    Points
    175
    Par défaut Import données Excel dans Form Access
    Bonjour, mon souci est le suivant :
    1. Je dois importer un fichier Excel
    2. Je récupère les informations de cellules données
    3. Je mets le résultat dans les champs d'un formulaires

    Le souci est que ça ne marche pas tout le temps j'ai le message d'erreur suivant : Erreur d'exécution '462' : Le serveur distant n'existe pas ou n'est pas disponible

    J'ai lu sur certains forum qu'il fallait tuer le processus mais ça ne fonctionne pas.

    Config : WinXP Pro avec Access 2003 Pro

    Je transmets le code également Merci à tous

    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
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    fichier = ImportExcel(Me.hwnd, "Importer des fiches contacts", "Allez Cherchez le fichier", "C:\")
     
        Dim AppExcel As Excel.Application
        Dim wbFile As Excel.Workbook
     
        Set AppExcel = CreateObject("Excel.Application")  ' Ouverture d'excel
     
        If Not AppExcel Is Nothing Then
                Set wbFile = AppExcel.Workbooks.Open(fichier, False, True) 'Ouverture du classeur
                If Not wbFile Is Nothing Then
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![num] = Range("A2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![nom] = Range("D2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![adresse] = Range("E2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![cp] = Range("F2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![ville] = Range("G2")
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![selcom] = Range("B2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![seldep] = Range("H2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![numcom] = Range("B2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![dep] = Range("H2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![seltyp] = Range("C2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![selpays] = Range("I2")
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![tel] = Range("K2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![fax] = Range("L2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![port] = Range("M2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![email] = Range("N2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![site] = Range("O2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![selforme] = Range("P2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![SIRENN] = Range("Q2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![naf] = Range("R2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PDG] = Range("S2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![DG] = Range("T2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![ACHETEUR] = Range("U2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![MARKETING] = Range("V2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PACKAGING] = Range("W2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![QUALITE] = Range("X2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PRODUCTION] = Range("Y2")
                    Forms![MENU_GENERAL]![SAISIE_CLIENTS]![SAISIE_INFORMATIONS]![groupefi] = Range("J2")
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![CA] = Range("Z2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![caflexo] = Range("AA2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![cahelio] = Range("AB2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![caoffset] = Range("AC2")
     
                    ' Fermeture des élements
                     wbFile.Close
                     AppExcel.Application.Quit
                     Set AppExcel = Nothing
                End If
        End If

  2. #2
    Rédacteur/Modérateur

    Avatar de Heureux-oli
    Homme Profil pro
    Contrôleur d'industrie
    Inscrit en
    Février 2006
    Messages
    21 087
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 59
    Localisation : Belgique

    Informations professionnelles :
    Activité : Contrôleur d'industrie
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Février 2006
    Messages : 21 087
    Points : 42 926
    Points
    42 926
    Par défaut
    Petite question : pourquoi dans un formulaire ?

  3. #3
    Membre habitué Avatar de berti
    Profil pro
    Inscrit en
    Août 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 239
    Points : 175
    Points
    175
    Par défaut RE:
    Pourquoi dans un formulaire ? Tout simplement qu'il est doit être possible de rajouter d'autres informations sur certains champs et c'est plus conviviable de passer par un formulaire que par une table ou requête

  4. #4
    Invité
    Invité(e)
    Par défaut
    Bonjour

    Si j'ai bien compris ton code, tu récupères le nom du fichier par la fonction ImportExcel, est-ce que celle-ci te donne le nom du fichier et son chemin à tous les coups.

    Et à quel endroit se met le debuggeur lors de l'erreur ?

    Starec
    Dernière modification par Heureux-oli ; 19/10/2007 à 09h20.

  5. #5
    Rédacteur/Modérateur

    Avatar de Heureux-oli
    Homme Profil pro
    Contrôleur d'industrie
    Inscrit en
    Février 2006
    Messages
    21 087
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 59
    Localisation : Belgique

    Informations professionnelles :
    Activité : Contrôleur d'industrie
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Février 2006
    Messages : 21 087
    Points : 42 926
    Points
    42 926
    Par défaut
    Citation Envoyé par berti Voir le message
    Pourquoi dans un formulaire ? Tout simplement qu'il est doit être possible de rajouter d'autres informations sur certains champs et c'est plus conviviable de passer par un formulaire que par une table ou requête
    tu peux les mettre directement dans la table et ensuite afficher dans un formulaire.

  6. #6
    Membre habitué Avatar de berti
    Profil pro
    Inscrit en
    Août 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 239
    Points : 175
    Points
    175
    Par défaut Réponse à starec
    l'erreur se met sur la première ligne ou je récupère l'information de la cellule

  7. #7
    Invité
    Invité(e)
    Par défaut
    Bonjour

    Tu ouvres un classeur, mais peut-être faut-il que tu désignes la feuille où se trouve les cellules.

    Starec

  8. #8
    Membre habitué Avatar de berti
    Profil pro
    Inscrit en
    Août 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 239
    Points : 175
    Points
    175
    Par défaut Réponse starec
    salut starec,
    merci pour cette information, mais le problème n'est toujours pas résolu. Ducoup, le message d'erreur s'affiche sur la sélection de la feuille

    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
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    Call KillProcess("EXCEL.EXE")
     
        fichier = ImportExcel(Me.hwnd, "Importer des fiches contacts", "Allez Cherchez le fichier", "C:\")
     
        'DoCmd.TransferSpreadsheet acImport, 8, "CLIENTS_TEST", fichier, True
     
        Dim AppExcel As Excel.Application
        Dim wbFile As Excel.Workbook
     
        Set AppExcel = CreateObject("Excel.Application")  ' Ouverture d'excel
     
        If Not AppExcel Is Nothing Then
                Set wbFile = AppExcel.Workbooks.Open(fichier, False, True) 'Ouverture du classeur
                If Not wbFile Is Nothing Then
     
    'Erreur sur cette ligne : Erreur d'exécution 462
                    Worksheets("CLIENTS").Select
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![num] = Range("A2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![nom] = Range("D2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![adresse] = Range("E2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![cp] = Range("F2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![ville] = Range("G2")
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![selcom] = Range("B2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![seldep] = Range("H2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![numcom] = Range("B2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![dep] = Range("H2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![seltyp] = Range("C2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![selpays] = Range("I2")
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![tel] = Range("K2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![fax] = Range("L2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![port] = Range("M2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![email] = Range("N2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![site] = Range("O2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![selforme] = Range("P2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![SIRENN] = Range("Q2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![naf] = Range("R2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PDG] = Range("S2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![DG] = Range("T2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![ACHETEUR] = Range("U2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![MARKETING] = Range("V2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PACKAGING] = Range("W2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![QUALITE] = Range("X2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PRODUCTION] = Range("Y2")
                    Forms![MENU_GENERAL]![SAISIE_CLIENTS]![SAISIE_INFORMATIONS]![groupefi] = Range("J2")
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![CA] = Range("Z2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![caflexo] = Range("AA2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![cahelio] = Range("AB2")
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![caoffset] = Range("AC2")
     
                    ' Fermeture des élements
                     wbFile.Close
                     Set wbFile = Nothing
                     AppExcel.Application.Quit
                     Set AppExcel = Nothing
                End If
        End If

  9. #9
    Invité
    Invité(e)
    Par défaut
    Re

    Tu ne peux pas utiliser Worksheet comme cela, il faut que tu déclares une variable objet comme tu l'as fait pour le Workbook.

    Fais une recherche avec Worksheet sur le forum et les FAQs, tu trouveras toutes les infos.

    Starec

    PS : N'oublie pas les balises codes

  10. #10
    Membre habitué Avatar de berti
    Profil pro
    Inscrit en
    Août 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 239
    Points : 175
    Points
    175
    Par défaut RE Encore Starec
    tu as raison j'ai bien vu que ma déclaration n'allait pas. J'ai lu sur le support microsoft le problème. Toutefois j'ai maintenant une erreur 1004 Erreur définie par l'application ou par l'objet.

    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
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    Call KillProcess("EXCEL.EXE")
     
        fichier = ImportExcel(Me.hwnd, "Importer des fiches contacts", "Allez Cherchez le fichier", "C:\")
     
        'DoCmd.TransferSpreadsheet acImport, 8, "CLIENTS_TEST", fichier, True
     
        Dim xlApp As Excel.Application
        Dim xlBook As Excel.Workbook
        Dim xlSheet As Excel.Worksheet
     
        Set xlApp = CreateObject("Excel.Application")  ' Ouverture d'excel
     
        If Not xlApp Is Nothing Then
                Set xlBook = xlApp.Workbooks.Open(fichier, False, True) 'Ouverture du classeur
                If Not xlBook Is Nothing Then
     
                    Set xlSheet = xlBook.Worksheets("CLIENTS")
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![num] = xlSheet.Range(xlSheet.Cells(A, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![nom] = xlSheet.Range(xlSheet.Cells(D, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![adresse] = xlSheet.Range(xlSheet.Cells(E, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![cp] = xlSheet.Range(xlSheet.Cells(F, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![ville] = xlSheet.Range(xlSheet.Cells(G, 2))
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![selcom] = xlSheet.Range(xlSheet.Cells(B, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![seldep] = xlSheet.Range(xlSheet.Cells(H, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![numcom] = xlSheet.Range(xlSheet.Cells(B, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![dep] = xlSheet.Range(xlSheet.Cells(H, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![seltyp] = xlSheet.Range(xlSheet.Cells(C, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_OBLIGATOIRE]![selpays] = xlSheet.Range(xlSheet.Cells(i, 2))
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![tel] = xlSheet.Range(xlSheet.Cells(K, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![fax] = xlSheet.Range(xlSheet.Cells(L, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![port] = xlSheet.Range(xlSheet.Cells(M, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![email] = xlSheet.Range(xlSheet.Cells(N, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![site] = xlSheet.Range(xlSheet.Cells(O, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![selforme] = xlSheet.Range(xlSheet.Cells(P, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![SIRENN] = xlSheet.Range(xlSheet.Cells(Q, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![naf] = xlSheet.Range(xlSheet.Cells(R, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PDG] = xlSheet.Range(xlSheet.Cells(S, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![DG] = xlSheet.Range(xlSheet.Cells(T, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![ACHETEUR] = xlSheet.Range(xlSheet.Cells(U, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![MARKETING] = xlSheet.Range(xlSheet.Cells(V, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PACKAGING] = xlSheet.Range(xlSheet.Cells(W, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![QUALITE] = xlSheet.Range(xlSheet.Cells(X, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_INFORMATIONS]![PRODUCTION] = xlSheet.Range(xlSheet.Cells(Y, 2))
                    Forms![MENU_GENERAL]![SAISIE_CLIENTS]![SAISIE_INFORMATIONS]![groupefi] = xlSheet.Range(xlSheet.Cells(j, 2))
     
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![CA] = xlSheet.Range(xlSheet.Cells(Z, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![caflexo] = xlSheet.Range(xlSheet.Cells(AA, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![cahelio] = xlSheet.Range(xlSheet.Cells(AB, 2))
                    Forms![MENU_GENERAL]![IMPORT_CLIENTS]![IMPORT_FINANCIERE]![caoffset] = xlSheet.Range(xlSheet.Cells(AC, 2))
     
                    ' Fermeture des élements
                    xlBook.Saved = True
                    Set xlSheet = Nothing
                    Set xlBook = Nothing
                    xlApp.Quit
                    Set xlApp = Nothing
                End If
        End If
    Qu'en penses tu ?

  11. #11
    Invité
    Invité(e)
    Par défaut
    Re

    Essaye à la place de
    [
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    xlSheet.Range(xlSheet.Cells(A, 2))
    de mettre

    Starec

  12. #12
    Membre habitué Avatar de berti
    Profil pro
    Inscrit en
    Août 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : France

    Informations forums :
    Inscription : Août 2007
    Messages : 239
    Points : 175
    Points
    175
    Par défaut SUPER
    merci pour l'info ça fonctionne

    A bientôt et merci encore pour tes conseils Starec

  13. #13
    Invité
    Invité(e)
    Par défaut
    Re

    De rien.

    Pour complément regarde sur l'instruction With .. end With pour clarifier ton code.

    Starec

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème d'import de donnée Excel dans table Access
    Par shakapouet dans le forum VBA Access
    Réponses: 1
    Dernier message: 17/08/2012, 23h12
  2. Aide sur importation données Excel dans Access Via Visual Basic 6.0
    Par moirs555 dans le forum VB 6 et antérieur
    Réponses: 0
    Dernier message: 19/08/2011, 09h02
  3. [A-07] Importer données excel dans une table access
    Par Angelo91 dans le forum VBA Access
    Réponses: 1
    Dernier message: 07/10/2008, 12h48
  4. Access : Importer données Excel dans une table Access
    Par kamala dans le forum VBA Access
    Réponses: 1
    Dernier message: 18/09/2007, 08h36
  5. problème pour importer données excel dans Access
    Par sarah67 dans le forum Access
    Réponses: 8
    Dernier message: 20/02/2006, 08h17

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