+ Reply to Thread
Results 1 to 7 of 7

Including VBA code to copy filepath to cell range

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Including VBA code to copy filepath to cell range

    Hi,

    In my macro, my code will open a number of files to extract data into seperate tabs. My query is, when the code opens the files i want to paste the filepath of these files into a cell on source tab of the macro?

    The souce tab of the macro is called 'Start'

    Is this possible?
    Last edited by kenadams378; 09-18-2012 at 09:14 AM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Including VBA code to copy filepath to cell range

    attach your code
    If solved remember to mark Thread as solved

  3. #3
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: Including VBA code to copy filepath to cell range

    as requested

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Including VBA code to copy filepath to cell range

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: Including VBA code to copy filepath to cell range

    Apologies, it doesn;t work it is erroring with - object required

    based on your instruction the amended code is;

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Including VBA code to copy filepath to cell range

    Worksheets("Start").Range("B3").value = FName

  7. #7
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: Including VBA code to copy filepath to cell range

    you are a star!

    Works!

    Thank you so much!!!!

+ 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