+ Reply to Thread
Results 1 to 3 of 3

Copy sheet from another workbook based on ComboBox names of the Workbook and sheet

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    161

    Copy sheet from another workbook based on ComboBox names of the Workbook and sheet

    Hi all,

    I've created UserForm with which I can select a sheet (from all sheets of all open work books) and copy the sheet to my active workbook.
    On the user form I have 3 objects:
    ComboBox1
    ComboBox2
    CommandButton1

    In the ComboBox1 are displayed all open workbooks names. After I choose workbook from the list in ComboBox1, in ComboBox2 is generated list of all available sheets in the chosen workbook.
    The workbook name in ComboBox1 is displayed as “Workbook name.xlsb”
    The sheet name in ComboBox2 is displayed as “Sheet name”.

    I need, after I select workbook (ComboBox1) and sheet (ComboBox2), and after I click CommandButton1, the selected sheet to be copied to my active workbook.

    Below is my code (which goes in the user form). Can someone help me with this? Not sure where is my error.

    Please Login or Register  to view this content.
    Thank you in advance for your help,

    Igor

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Copy sheet from another workbook based on ComboBox names of the Workbook and sheet

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    161

    Re: Copy sheet from another workbook based on ComboBox names of the Workbook and sheet

    that's perfect Olly!!!
    Thank 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. [SOLVED] copy sheets to new workbook when sheet names are similar.
    By kleptilian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2016, 09:19 AM
  2. Replies: 3
    Last Post: 11-06-2014, 01:23 AM
  3. [SOLVED] Copy named sheets from one workbook to names sheet in other
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-30-2014, 07:42 AM
  4. [SOLVED] Copy Non-compliant Names to Another Sheet in The Same Workbook
    By BellaxPalus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2013, 05:43 AM
  5. [SOLVED] Copy Values From Each Workbook in Folder to a Single Sheet in New Workbook +Workbook names
    By Arsham24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2012, 07:42 PM
  6. Seach in folder and copy data from file based on sheet names in master workbook
    By Hassø in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-06-2012, 09:25 AM
  7. [SOLVED] copy active sheet, create new workbook, name new workbook based on cell reference
    By jm0392 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2012, 07:12 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