+ Reply to Thread
Results 1 to 5 of 5

Scrape Specific Worksheets across all Files in a Folder

  1. #1
    Registered User
    Join Date
    07-19-2019
    Location
    Montreal, Canada
    MS-Off Ver
    10
    Posts
    3

    Scrape Specific Worksheets across all Files in a Folder

    Hi all,

    New to VBA coding and was wondering if the following was possible:

    Attempting to run a macro that will scrape through all files within a folder, searching for specific sheets, copy pasting values in the master sheet. I'm using the following code in order to do so but am getting errors.

    Please Login or Register  to view this content.
    Any help would be greatly appreciated!
    Last edited by jeffreybrown; 08-10-2019 at 07:54 PM. Reason: Please use code tags!

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Scrape Specific Worksheets across all Files in a Folder

    Welcome to the forum! What line has the error? It could error if you referenced a sheet that does not exist. Use this to check first.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-19-2019
    Location
    Montreal, Canada
    MS-Off Ver
    10
    Posts
    3

    Re: Scrape Specific Worksheets across all Files in a Folder

    Thanks for the reply!

    The problem lies on the following line:

    Worksheets("OPEX Reader").Range("A4:O224").Copy_

    The line prompts the error:
    "Object doesn't support property or method"

    Thanks in advance for the support!

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,519

    Re: Scrape Specific Worksheets across all Files in a Folder

    If you change this
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    does that make a difference?

    This might be an alternative
    Change all references as required.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-19-2019
    Location
    Montreal, Canada
    MS-Off Ver
    10
    Posts
    3

    Re: Scrape Specific Worksheets across all Files in a Folder

    Thanks for the reply!

    I realized that I should have mentioned that I only need the values to be pasted. I tried adding in .PasteSpecial Paste:=xlPasteValues but am getting errors.

    I know I must bed missing something pretty straightforward but I haven't got a clue what else to do.

    Thanks again

+ 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. VBA Copy specific files listed in Excel from folder & subfolders to another folder - FSO
    By HelloFriends in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-03-2019, 02:55 PM
  2. Replies: 1
    Last Post: 01-28-2019, 06:55 PM
  3. [SOLVED] Moving Files from Source Folder to Specific Folder
    By sammymalta in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-08-2018, 06:15 AM
  4. Extract specific column data from specific sheet from multiple files in a folder
    By piggyfox in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-31-2013, 11:51 AM
  5. Replies: 1
    Last Post: 01-24-2006, 11:35 AM
  6. Replies: 1
    Last Post: 01-24-2006, 11:00 AM
  7. Replies: 1
    Last Post: 01-24-2006, 12:25 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