+ Reply to Thread
Results 1 to 8 of 8

Loop to copy from multiple files and sheets to one long list

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Thumbs down Re: Loop to copy from multiple files and sheets to one long list

    Hi sdb

    Ok. I think I've got most of it.

    a)
    a.1)Select all now working. I have modified the form. It doesn't do anything until you hit the Import button, then it does everything. I moved all your old Click macros to a separate Module.
    a.2) There was no Checkbox10 (well, it was labelled 11 - they were all out after that). I have added this.
    b) Done. It uses the DateValue function to build the date.
    c) A bit complicated! It currently uses the sheet number to select a string from a list coded in to the macro. You can use a different value to select the string to use (such as left(wb.name,1)). I have put some comments in the macro. If you can't understand it, just let me know. I have also added a text box to the Form, so that you can override the macro's hard coded note.

    I have set up the OEE sheet, and added a new macro to Module2. (BTW - It is not good practice to have two macros with the same name). The new OEELoopThrough macro copies data to the OEE sheet and adds the two columns.

    Have a look over my version and let me know if you have any questions.

    Cheers, Rob.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    03-03-2012
    Location
    water valley, ms
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Loop to copy from multiple files and sheets to one long list

    morning Rob,

    can you explain the differences between the new code and the old code?

    Also, just one last question:
        If destn.Value > "" Then
             destn.Offset(0, 16).Resize(40, 1) = dtDate
         destn.Offset(0, 17).Resize(40, 1) = strNote
         desttn.offest(0, 18).Resize(40, 1) = "1"
         End If
    should return a column with 1 in each cell but isn't.

    Also, I get a value of 5 for some of the cells in "Shift" and the only sheets I have open say 1st, 2nd, and 3rd.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1