Results 1 to 5 of 5

Get file path from a cell, run a check to see if the file has a specific sheet if yes copy

Threaded View

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    2

    Cool Get file path from a cell, run a check to see if the file has a specific sheet if yes copy

    Hello

    I am trying to build a master purchase order spreadsheet, which will run a macro from a specific cell and check if the file has a sheet called extract if it has then it will copy a name range in the sheet which is also called extract and paste to the master spread sheet moving one column to the left each time.

    So far I found a spreadsheet on another website that runs a macro to get the filepaths into individual cells in a spreadsheet, I have found code on here that opens the workbooks, but now I'm thinking as there are over 500 files each in a seperate folder that it will be quicker to do this with the workbooks closed. The code I have so far is

    Sub Openfile()
    
    Workbooks.Open Range("A1") & ".xlsm"
    
    End Sub
    Book2.xlsm

    I need this code to loop throught the cells also.

    I am fairly new to vba, is what im lookng for achievable?
    Last edited by Martha44; 03-04-2013 at 03:10 AM.

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