+ Reply to Thread
Results 1 to 3 of 3

Amend This Loop Macro

  1. #1
    Registered User
    Join Date
    04-26-2007
    Posts
    94

    Amend This Loop Macro

    Hi Guys,

    I have come across the following macro here: http://www.ozgrid.com/News/aug-2005.htm

    Please Login or Register  to view this content.
    What I would like it to do is rather than looking in location "C:\MyDocuments\TestResults" as it currently does, I would like the user to be able to browse to their chosen location/folder.

    Can anyone show me how to do this?

    Thanks
    Dave

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning davehunter

    I would like the user to be able to browse to their chosen location/folder.
    This is basically how you can call the standard Windows Browse function for use in your own applications (in this instance the path is dumped into a variable, directory, to be shown in a MsgBox) :

    Please Login or Register  to view this content.
    It is probably worth mentioning that you can also use the file dialog object (Application.FileDialog(msoFileDialogFolderPicker)), which admittedly is much simpler, but this was introduced with XL2002, so won't be compatible with all recent versions of Excel (and I much prefer the browse function given, anyway)...

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    04-26-2007
    Posts
    94
    Quote Originally Posted by dominicb
    Good morning davehunter



    This is basically how you can call the standard Windows Browse function for use in your own applications (in this instance the path is dumped into a variable, directory, to be shown in a MsgBox) :

    Please Login or Register  to view this content.
    It is probably worth mentioning that you can also use the file dialog object (Application.FileDialog(msoFileDialogFolderPicker)), which admittedly is much simpler, but this was introduced with XL2002, so won't be compatible with all recent versions of Excel (and I much prefer the browse function given, anyway)...

    HTH

    DominicB

    Hi DominicB. Would you be able to merge these into an example Workbook and attach it so I can see what you mean? I am new to VB and Excel so it would really be appreciated.

    Thanks!
    Dave

+ 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