Consulting

Results 1 to 7 of 7

Thread: Looping through cells and move sheets from file in folder.

  1. #1
    VBAX Newbie
    Joined
    Jan 2010
    Posts
    5
    Location

    Looping through cells and move sheets from file in folder.

    Hi,

    Could some one please help me on this:

    Description:
    This should be a one- or two-line description of the outcome after the code has been run.


    There are file names vertically in worksheet(find attached sample) and I have files of these names in folder.
    On file name in the cell and file name in the folder matches, the sheets in the file should move to the file.


    Discussion:
    Provide a real-life scenario in which this code can be used. You can use as much space as you like here. Be friendly if you can, remembering that we need to cater to people who do not understand VBA.


    There will be many sample files which consist of file name’s vertically in one folder (find sample attached) and there are files in the another folder with these names consists of details in many sheets.

    So I want to have a macro where, it should ask for path twice one for opening of sample files in the folder and another path for source folder which has file details.

    Criteria : if the file name in the sample file and file name in folder matches(first 40 characters) the sheets in the file should move or copy to the sample file.

    Code:

    I have codes for opening sample files and I need your support for looping through the cells and on blank cell in sample file while looping it should close the file.

    Please find codes in the sample file attached.

    Thanks in advace.

    CK-,

  2. #2
    Suggestion:
    Why don't you place 'reports done' and 'reports pending' in two different folders with that name and browse the folder you want.
    You can make a routine to combine all the files in that specific folder and make an index as first sheet.
    See the KB for combine files from folder and loop through files.

    Just an idea to start with.

    Interested to know why you wrote 'Be friendly if you can, remembering that we need to cater to people who do not understand VBA' is part of your post?

  3. #3
    VBAX Newbie
    Joined
    Jan 2010
    Posts
    5
    Location
    I can place both files done and pending in one folder,but i'm not getting the loop with checks for creteria and moves/copy the sheets to sample file.

    could you please help me on this.

  4. #4
    VBAX Newbie
    Joined
    Jan 2010
    Posts
    5
    Location
    Can you please help me on this ASAP.

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by pvanrooijen
    Interested to know why you wrote 'Be friendly if you can, remembering that we need to cater to people who do not understand VBA' is part of your post?
    Because it's homework? That's how I read it.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    VBAX Newbie
    Joined
    Jan 2010
    Posts
    5
    Location
    Hello Xld,

    Are you working with my requirement,could u please help me ASAP.

    Wellthe reason i wrote "Be friendly... because i got the format initially to submit for the help as with bolded headings as below and there by to expalin..

  7. #7
    VBAX Newbie
    Joined
    Jan 2010
    Posts
    5
    Location
    Can some one help on this.

Posting Permissions

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