+ Reply to Thread
Results 1 to 3 of 3

Copy columns from one user selected workbook to another

  1. #1
    Registered User
    Join Date
    04-27-2014
    Location
    Argentina
    MS-Off Ver
    Excel 2010
    Posts
    12

    Copy columns from one user selected workbook to another

    Hi guys,

    I am using this code to copy columns C,D, and P from a user selected workbook into position C,D,E of workbook "Checklist.xlsx" (the one from were I run the VBA code). I don't have a clue about VBA, just have been gathering info, but the code works pretty fine. The only issue is that it opens twice the workbook "wbExt" hence the system prompts me if i want to reopen the already open workbook (anoying).

    Some questions:

    1) Is there a way to copy the 3 columns at once? something like "Columns("C:D, P").Select".
    2) Is there a way to select the workbook from were to copy the column without needing it to actually open?
    3) is there a way to paste the columns starting from row 3 instead of row 1 (Range("C1").Select)?
    I would really appreciate your help.

    Thank you.
    Regards,

    Please Login or Register  to view this content.
    Last edited by bellfano; 04-27-2014 at 03:19 AM. Reason: to add code tags

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Copy columns from one user selected workbook to another

    Hi, bellfano,

    welcome to ExcelForum. Accrording to our Forum Rule #3 you would need to add code-tags to your procedure.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Copy columns from one user selected workbook to another

    Hi, Hi, bellfano,,

    according to my knowledge you would need to do the copying for each range on it´s own as you have recorded.
    Getting data from closed workbooks is mostly done using ADO - maybe have a look Copy a range from closed workbooks (ADO).
    You can´t add a full column starting at Row 3

    Please Login or Register  to view this content.
    Ciao,
    Holger

+ 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 worksheets and selected columns into new workbook and name each file uniquely
    By Mad-Dog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2013, 08:00 AM
  2. [SOLVED] Import user selected columns from a text file
    By aarho in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-11-2012, 08:28 PM
  3. How to Copy User defined columns from one workbook to another
    By Mah_OS in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-22-2012, 03:49 PM
  4. macro to copy row selected by user
    By jimb0693 in forum Excel General
    Replies: 8
    Last Post: 04-21-2007, 10:11 PM
  5. Opening a user selected workbook
    By David Hall in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2005, 04:06 PM

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