Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    open only to folder level (Excel 2000)

    I am trying to create a file open macro that takes me to the "folder level" allowing me to browse thru the folder for the one I want. In recording a macro to edit, I had to pick a file. When I then delete that file name to stop at the folder level, the macro breaks. Thanks for the advice.

    ChDir _
    "Cocuments and SettingstorqLocal SettingsTemporary Internet FilesOLK5"
    Workbooks.Open(Filename:= _
    "Cocuments and SettingstorqLocal SettingsTemporary Internet FilesOLK5 test.xls " _
    ).RunAutoMacros Which:=xlAutoOpen
    End Sub

    I don't want to open test. I want to see all files. I guess this is a problem with editing those macro copies.

  2. #2
    Star Lounger
    Join Date
    Jan 2001
    Location
    Adelaide, South Australia, Australia
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: open only to folder level (Excel 2000)

    Will the standard File Open dialog do what you need?
    You can call it from Visual Basic by <pre>Application.Dialogs(xlDialogOpen).Show</pre>

    Ian.

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: open only to folder level (Excel 2000)

    Try something like this:

    <pre>Dim vFName
    ChDir "Cocuments and SettingstorqLocal SettingsTemporary Internet FilesOLK5"
    vFName = Application.GetOpenFilename
    </pre>

    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •