+ Reply to Thread
Results 1 to 10 of 10

Copy Select Columns from closed workbook into active workbook

  1. #1
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Copy Select Columns from closed workbook into active workbook

    From my active workbook I want to:

    Get a template from a closed workbook located at C:\Users\Jim\Documents \Templates\Monthly-Template.xlsx
    Copy Columns H-J or if easier Range H1:J150
    It should paste to the active workbook in the same range col H1

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

    Re: Copy Select Columns from closed workbook into active workbook

    Try:
    Please Login or Register  to view this content.
    Change the sheet names to suit your needs.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: Copy Select Columns from closed workbook into active workbook

    Thanks Mumps1
    I'm getting a debug error on the .Sheets line
    I thought perhaps the first "Sheet1" was looking for the name of the sheet in the template file so inserted "Transportation Report by Mode" the second "Sheet1" I took as needing the destination worksheet so put "TripTransProvCount.rpt"

    Still no joy - any suggestions

    With ActiveWorkbook
    .Sheets("Sheet1").Range("H1:J150").Copy wkbDest.Sheets("Sheet1").Range("H1")
    .Close False

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

    Re: Copy Select Columns from closed workbook into active workbook

    When I tested the macro on two dummy files, it worked properly. It would be easier to test if I could see your actual files. Could you post copies of your two file?

  5. #5
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: Copy Select Columns from closed workbook into active workbook

    Not sure how to add a files mid thread

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

    Re: Copy Select Columns from closed workbook into active workbook

    Click the "Reply to Thread" button. Next scroll down to find the "Manage Attachments" button and click it. A window will open up with an "Add Files" button. Then you will see a "Brouse" button. Click it and the rest should be easy to understand.

  7. #7
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: Copy Select Columns from closed workbook into active workbook

    Thanks attached

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

    Re: Copy Select Columns from closed workbook into active workbook

    Try this macro in a regular module in the "TripTransProvCount-Sep15b.xlsx" workbook.
    Please Login or Register  to view this content.
    I tested the macro and it worked properly.

  9. #9
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: Copy Select Columns from closed workbook into active workbook

    Thanks for your help - and patience! It still highlights the same line for me.
    I did find a code I used long ago - combersome but works -
    Please Login or Register  to view this content.
    I'll close the post so as not to take up your time. I really appreciate you going the extra mile in helping.

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,056

    Re: Copy Select Columns from closed workbook into active workbook

    It's funny how it worked for me but not for you but I'm glad you got something that worked for you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy from active workbook to a closed workbook
    By GEMINI528 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2014, 11:46 AM
  2. [SOLVED] Code to copy data from a closed workbook and paste in active workbook using named range.
    By paullie1912 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-28-2014, 02:38 AM
  3. Run Macro in closed workbook and copy specific coloumn in active workbook
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2013, 03:43 AM
  4. Macro to open a closed workbook and select copy cells into an open workbook
    By helloganesh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2013, 02:00 PM
  5. Copy worksheet from closed workbook into active/existing workbook.
    By rasikvekaria in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2012, 06:55 AM
  6. [SOLVED] COPY from an open workbook with particular sheet and columns to active workbook
    By purin0c0 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2012, 03:57 PM
  7. Copy columns from closed workbook to different columns in open workbook
    By jGLZa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2012, 11:03 PM

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