+ Reply to Thread
Results 1 to 3 of 3

Importing worksheets if certain condition is fulfilled

  1. #1
    Registered User
    Join Date
    05-30-2011
    Location
    Iowa
    MS-Off Ver
    Excel 2010
    Posts
    23

    Importing worksheets if certain condition is fulfilled

    Hi

    I need help with this, I am trying to import worksheets into my workbook if certain condition is fulfilled. I am able to do it the first time, but the coding would not import the second, third and etc times. Please help!

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Importing worksheets if certain condition is fulfilled

    it is because when you insert the first sheet, the active sheet is changed and "Example" (where the Button 1 is) is no longer the active one. You have to reselect the original sheet for your code to work.
    Like this: (make sure the names are the ones you have in your workbooks)

    Please Login or Register  to view this content.
    Last edited by royUK; 07-07-2011 at 07:52 AM.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Importing worksheets if certain condition is fulfilled

    Make sure that the range being checked refers to the correct sheet, you don't need to select the sheet

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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