+ Reply to Thread
Results 1 to 5 of 5

User input for current path?

  1. #1
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208

    User input for current path?

    I am writing a macro that will perform a loop operation to export files. I want the user to specify the path, and the macro will save each exported file to that folder.

    I did a number of searches and I can't find exactly what I'm looking for.

    I think I want to use ChDir after using CurDir. But I don't know how to code the macro so that it asks the user to specify the location.

    Can I do something like this?
    Please Login or Register  to view this content.
    Thanks,
    -gshock
    Last edited by gshock; 10-31-2008 at 11:21 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    maybe something like this to allow the user to pick folder.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208
    Hi Andy,
    Thanks for the suggestion. I get an 'Object doesn't support this property or method' error on this line:
    Please Login or Register  to view this content.
    I'm on company software and they've disabled the Tools-->References menu option. I've seen reference to this in other posts on similar topics. Not sure if this applies.

    VB 6.5, Excel 2000

    Thanks.
    -gshock
    Last edited by gshock; 10-31-2008 at 10:15 AM.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    FileDialog is not available in xl2000

    You could try the BrowseForFolder example here,
    http://www.oaltd.co.uk/MVP/Default.htm

  5. #5
    Forum Contributor
    Join Date
    03-04-2008
    Location
    Ohio
    MS-Off Ver
    Office 2010
    Posts
    208

    That will do nicely...

    Andy,
    Thanks very much. That works nicely. It's amazing how much more complicated it is on older versions. Corporate infrastructure. Go figure.

    Thanks again,
    -gshock

+ 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