+ Reply to Thread
Results 1 to 4 of 4

Browse for File to open

Hybrid View

RobynC Browse for File to open 09-17-2007, 06:58 AM
MattShoreson application.getopenfilename 09-17-2007, 07:01 AM
mudraker sFile =... 09-17-2007, 07:24 AM
RobynC Perfect, Thank-you, figured... 09-17-2007, 07:30 AM
  1. #1
    Registered User
    Join Date
    08-16-2007
    Location
    Portsmouth, UK
    Posts
    86

    Browse for File to open

    Hi again

    Is it possible to call a file open window from VBA? That is, allow the user to browse for the file that they wish to open then same way that you can by selecting File-Open from the tools menu?

    I need to do this as the files the macro runs on could be anywhere, but they will be .txt files that I then load in with certain settings etc.

    At present people have to save the file in a specific folder, from which the program can identify it, but I would ideal like this not to be necessary.

  2. #2
    Forum Contributor
    Join Date
    12-04-2003
    Posts
    360
     application.getopenfilename
    Last edited by VBA Noob; 09-17-2007 at 07:10 AM.

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    sFile = Application.GetOpenFilename("Text Files (*.txt), *.txt")
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    08-16-2007
    Location
    Portsmouth, UK
    Posts
    86
    Perfect, Thank-you, figured it would be something simple like that

+ 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