• open only to folder level (Excel 2000)

    Author
    Topic
    #390102

    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 _
    “C:Documents and SettingstorqLocal SettingsTemporary Internet FilesOLK5”
    Workbooks.Open(Filename:= _
    “C:Documents 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.

    Viewing 1 reply thread
    Author
    Replies
    • #691686

      Will the standard File Open dialog do what you need?
      You can call it from Visual Basic by

      Application.Dialogs(xlDialogOpen).Show

      Ian.

    • #691709

      Try something like this:

      Dim vFName
          ChDir "C:Documents and SettingstorqLocal SettingsTemporary Internet FilesOLK5"
          vFName = Application.GetOpenFilename
      
    Viewing 1 reply thread
    Reply To: open only to folder level (Excel 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: