Results 1 to 8 of 8

Import Specific Sheet into Workbook with VBA

Threaded View

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007/10
    Posts
    43

    Import Specific Sheet into Workbook with VBA

    Hi all,

    I am working creating an excel tool, and part of it involves importing a sheet from one workbook into another. However, I want it to be dynamic so that the name of the sheet doesn't have to be the same.

    Right now I have the following code that imports the sheet named "Import"
    'get imported file
    Set wb1 = ActiveWorkbook
    ImportFile = Application.GetOpenFilename("Excel Files (*.xlsx*), *.xlsx*,(*.xls*), *.xls*", _
        , "Please select the lane data.")
        If ImportFile = False Then Exit Sub
    Set wb2 = Workbooks.Open(ImportFile)
        wb2.Sheets("Import").Copy Before:=wb1.Sheets("Instructions")
        wb2.Close SaveChanges:=False
    Is there a way to display what sheet names exist within the workbook that you want to import from, and then allow the user to select which they would like? (As is possible when importing excel data into access)

    Any help or suggestions would be appreciated, thanks!
    Last edited by chicagoland8; 09-18-2014 at 11:13 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Import specific data from one workbook another!
    By iluvfnky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2014, 09:54 AM
  2. Import specific sheet with name and Date mm/dd/yyyy from closed workbook
    By frank35 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-22-2013, 11:21 AM
  3. How to import excel specific data to a new workbook
    By GEMINI528 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2013, 02:35 PM
  4. [SOLVED] Import from 2nd workbook to specific worksheet
    By ERoemer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2013, 03:15 PM
  5. Replies: 2
    Last Post: 11-17-2010, 11:39 AM

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