+ Reply to Thread
Results 1 to 10 of 10

Path of File Picked Up From Cells In Spreadsheet

  1. #1
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Path of File Picked Up From Cells In Spreadsheet

    Hi All,

    Is there a way to make the contents of a particular cell in a worksheet show where to pick up another file. Here is my code to pick up a file:

    Please Login or Register  to view this content.
    Then, I need to be able to pickup the path and drive from a cell out of a particular worksheet so I user can change it when they move the project around.
    Lets say I want to put the drive and path under A1 and A2 in workbook named KittyCat where a user can go in and change it. How would I alter the code above to make it accept this. Thank you for any help you can provide on this!!!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Do you mean like this/

    Please Login or Register  to view this content.
    Does your posted code work? It needs a Function - GetFileName
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Roy--> It works....Here is the function you asked about

    Please Login or Register  to view this content.
    Do you know how I can make it accept the path and drive out of a worksheet cell??? P

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Glad it worked. I just wasn't sure if you knew that the Function was needed.

    Please mark your Thread Solved.

  5. #5
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573
    Cells(1,1) is the same as Range("A1"). So, to put and get a value for cell A1:
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Still Working on Problem

    Kenneth Hobson - This looks like what I need. How do I specify a specific sheet of a workbook with the code you just gave me??

    Roy- I am still trying to solve. Thank you for all the help so far though!!

  7. #7
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    Kenneth Hobson -

    Besides picking a specific worksheet to pull A1 from out of workbook. I would like to know where would I put this code, too? Could you show me the right spot to make it work - SEOT

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I thought that you said it worked, the code that i gave you will pick the path up from A1. You need to type the path into it.

    Please Login or Register  to view this content.

  9. #9
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573
    You can be more literal and fully qualify it.
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    05-20-2008
    Location
    Virginia
    MS-Off Ver
    2003
    Posts
    129

    You Guys Are the BEST!!!!

    I got it working via combining a little of what you both gave me!!!

    How did you two get so good at this?? I want to be like that!!!
    Thank U Sooo MUCH!!!!!

+ 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. macro to import text file
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2008, 09:08 AM
  2. Use one file to accumulate cells on a second file(closed).
    By nousibona in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2008, 12:36 AM
  3. Determining relative file path macro
    By ctmurray in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2007, 12:25 AM
  4. Replies: 3
    Last Post: 12-20-2006, 08:17 AM
  5. Access one spreadsheet in file from another in the same file
    By doRodrigo in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 12-10-2006, 06:39 PM

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