Consulting

Results 1 to 5 of 5

Thread: Tryin to get some Excel fields into Access...

  1. #1

    Tryin to get some Excel fields into Access...

    Hey there,
    im trying to automate my office grudge, and im bangin my head after a couple of days of cutting&pasting code im getting from your great forum, but im not going anywhere! anyway,

    I have a 100 xls files in C:\ and I need to get a couple of cells from each of this folders, say D8 and H14:L14, and add these values to an Access 2003 table,

    could you help me? none of my cut&paste thing seems to be workin for me...

    Rodrigo

  2. #2
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,289
    Location
    This is an example of excel workbook with some code to update a specified acces database. You could probably adapt the routine with the sql command that is used to automate the updating of your excel files to acces.

    Save both files of this zipfile into the same directory.

    I hope it will give you some ideas.

    Charlize

    Take a look at this thread for the zipfile : http://vbaexpress.com/forum/showthread.php?t=15987

  3. #3
    VBAX Master CreganTur's Avatar
    Joined
    Jan 2008
    Location
    Greensboro, NC
    Posts
    1,676
    Location
    Comment removed: I thought you wanted to pull in entire fields, then I reread and saw you only want specific fields.
    -Randy Shea
    I'm a programmer, but I'm also pro-grammar!
    If your issue is resolved, please use Thread Tools to mark your thread as Solved!

    PODA (Professional Office Developers Association) | Certifiable | MOS: Access 2003


  4. #4
    thks a lot! this code seems to be useful, however, what i havent been able to do is to iterate over my 100+ files to get those same fields.

  5. #5
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,289
    Location
    Take a look at the dir syntax, ie. type dir in the vb editor, put the cursor somewhere in the word that you typed, hit F1. This will give you some clues to build a loop around the commands that takes care of the transfer from excel to access.

    Charlize

    ps.: What do you mean by
    this code seems to be useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •