+ Reply to Thread
Results 1 to 3 of 3

Open only .xls files in a given directory using macro

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Galway, Ireland
    MS-Off Ver
    MS Office 2010
    Posts
    8

    Open only .xls files in a given directory using macro

    Just wondering... I have a piece of code - a macro in excel that allows me to open files in a given directory. The thing is that I only want to open .xls files, and the code that I have opens all the files in a given directory.

    Can anyone help me with this matter.

    Thanks.

    Please Login or Register  to view this content.
    I have posted the thread on those sites as well:
    http://stackoverflow.com/questions/1...ry-using-macro
    http://www.excelforum.com/excel-prog...14#post3318314
    Last edited by ldsone; 07-11-2013 at 07:49 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Open only .xls files in a given directory using macro

    Add a check on the file extension.

    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-10-2013
    Location
    Galway, Ireland
    MS-Off Ver
    MS Office 2010
    Posts
    8

    Re: Open only .xls files in a given directory using macro

    Thanks a million... Works perfectly...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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