+ Reply to Thread
Results 1 to 4 of 4

How to direct a path name in VBA

  1. #1
    Registered User
    Join Date
    02-05-2008
    Posts
    2

    How to direct a path name in VBA

    Hi all,
    I will apologize in advance for asking such a mundane question, but I'm very new at this. I have a large workbook that I would like to use as a template on many directories of information. What I hope to do is have the user specify what directory the information is located in and then import a bunch of data from that folder into various worksheets. From searching online, I found the following macro for selecting the directory:
    Please Login or Register  to view this content.

    From what I understand, the directory path (ie. "C:\Files\Data") is stored as the string path. Is this correct? If so, then I would like to replace my data import syntax with this path. In the following example, how do I replace "C:\Documents and Settings\Administrator\Desktop\Test of unmixing EZ-C1 3.50\CD\CD - High Accuracy Average Reference Spectra" with my path string?
    Please Login or Register  to view this content.
    Thanks in advance!
    Last edited by royUK; 02-05-2008 at 01:50 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Welcome to the Forum. Please take the time to read the Forum Rules, they are posted at the top of each Forum, & use Code tags in future. i will add them this time.
    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 Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-05-2008
    Posts
    2
    Fantastic! Thanks Ron!
    Chris

+ 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