+ Reply to Thread
Results 1 to 6 of 6

Copy sheet from pat to specific sheet

  1. #1
    Registered User
    Join Date
    10-15-2015
    Location
    NL
    MS-Off Ver
    2013
    Posts
    15

    Post Copy sheet from pat to specific sheet

    Hi all,

    This is a lot to ask but i am really stuck at this point.
    I almost completed my file but I am looking for a solution.
    I have a partlist for every product (named as Aricle 1,2,3,etc). This file contains 1 sheet with like 20 rows of data. I am looking for a way to copy the data from those files to a sheet in this file.

    So: C:\\Test\Partlist\Article1.xlsx must copy to this file, sheet: article 1.


    Path of article - Copy to sheet
    C:\\Test\Partlist\Article1.xlsx - Article 1
    C:\\Test\Partlist\Article2.xlsx - Article 2
    C:\\Test\Partlist\Article3.xlsx - Article 3
    C:\\Test\Partlist\Article4.xlsx - Article 4
    C:\\Test\Partlist\Article5.xlsx - Article 5
    C:\\Test\Partlist\Article6.xlsx - Article 6
    C:\\Test\Partlist\Article7.xlsx - Article 7
    C:\\Test\Partlist\Article8.xlsx - Article 8
    Rules VBA
    Colom A is the path of the file
    Colom B is the sheet (in this file) were it has to copy to.
    When button is pushed the article sheets must renew (do delete and rebuild)
    (Good to know that every file in path has only 1 sheetname is standard)
    All the files are xlsx.


    Can someone help me please.

  2. #2
    Registered User
    Join Date
    02-24-2016
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    92

    Re: Copy sheet from pat to specific sheet

    Hi Martinus,

    You can try this:

    Please Login or Register  to view this content.
    Hoopthis helps,
    WouterM
    The Netherlands

  3. #3
    Registered User
    Join Date
    10-15-2015
    Location
    NL
    MS-Off Ver
    2013
    Posts
    15

    Re: Copy sheet from pat to specific sheet

    Gives an error on ThisWorkbook.Sheets(strSheet).Select
    Should i fill in the path in column A and the sheetname in comlum B?
    Should/Can i use header info?

  4. #4
    Registered User
    Join Date
    10-15-2015
    Location
    NL
    MS-Off Ver
    2013
    Posts
    15

    Re: Copy sheet from pat to specific sheet

    Hi Wouter,

    I fixed my problem for 50%...
    I found a way to do all what i need to do, but i need a loop.
    Do you know how.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-15-2015
    Location
    NL
    MS-Off Ver
    2013
    Posts
    15

    Re: Copy sheet from pat to specific sheet

    Hi Wouter,

    I fixed my problem for 50%...
    I found a way to do all what i need to do, but i need a loop.
    Do you know how.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-24-2016
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    92

    Re: Copy sheet from pat to specific sheet

    Hi Martinus,

    In stead of Range("H2") you can use Cells(2, 8).
    This will give:
    Please Login or Register  to view this content.

+ 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. Replies: 0
    Last Post: 09-16-2015, 01:18 PM
  2. Auto copy specific data from sheet to antoher sheet under few condition
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2014, 04:47 AM
  3. Replies: 6
    Last Post: 10-29-2014, 06:00 AM
  4. [SOLVED] Macro to copy date to specific sheet based on data from another sheet.
    By RichTea88 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-09-2013, 11:28 AM
  5. Replies: 0
    Last Post: 04-11-2013, 05:33 PM
  6. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  7. [SOLVED] Copy variable range from sheet to the last row with a specific blank column in new sheet
    By seputus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 07:29 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