+ Reply to Thread
Results 1 to 7 of 7

Export selected column to new workbook

  1. #1
    Registered User
    Join Date
    12-22-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    47

    Export selected column to new workbook

    Hi Friends,

    I am trying to copy selected columns to a new workbook.

    - Copy selected columns in ListBox1 to a new workbook
    - Row containing data will keep on changing (can increase or decrease), I mean to say that Range("B4:P25") is not fixed. So I need to keep it dynamic
    - For column selection i am trying to use ActiveX ListBox (so that multiple selection is enable), if you want you can use some other method also

    Here is the attached sample file Delete Selected Columns.xlsm

    Thanks & Regards,
    Manish

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Export selected column to new workbook

    try this code ,

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Export selected column to new workbook

    Improvising the code a bit, to copy only the used cells change this line of code

    from :
    Please Login or Register  to view this content.
    to :
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-22-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Export selected column to new workbook

    Thanks xlbiznes,

    Little bit of problem is there with the code.
    It is not selection Col 1. In i only select Col 1 then i am getting error in the below line
    Please Login or Register  to view this content.
    And if along with other columns i select Col 1 also then it does not select Col 1

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Export selected column to new workbook

    oops, here you go.

    Please Login or Register  to view this content.
    let me know if this is fine.

  6. #6
    Registered User
    Join Date
    12-22-2013
    Location
    Delhi, India
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Export selected column to new workbook

    Yes xlbiznes, its working fine. and now i also figured out what the problem was.

    Thanks a lot you made my life easy.

    Regards,
    Manish

  7. #7
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Export selected column to new workbook

    you are welcome,

    Please mark this thread as solved, if you are satisfied with the solution provided.

+ 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. export column A from two worsheets to one worksheet in an existing workbook
    By prestopr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2013, 09:50 AM
  2. How to export selected column into .xml file using excel 2007
    By mitchivous in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2013, 02:14 AM
  3. Replies: 12
    Last Post: 07-03-2013, 01:35 PM
  4. export filtered data (including header row) to new workbook, maintain column width
    By ovetcobo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2013, 03:47 PM
  5. Export each selected sheet to new workbook via pastespecial and save
    By jason117 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2011, 08: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