+ Reply to Thread
Results 1 to 2 of 2

Script not identifying excel files?

  1. #1
    Registered User
    Join Date
    10-22-2010
    Location
    Washington, DC
    MS-Off Ver
    Excel 2007
    Posts
    1

    Script not identifying excel files?

    Hi all,
    I have written the script below. The goal is open each .xls file in a folder, then save it to another folder as a .txt file. It works perfectly on my Windows 7 (64 bit) laptop, but I tried using it on an XP computer today, and it's not working. Both machines are running Excel 2007. The script doesn't error out, it just acts as if there are no Excel files in the Process folder (which there are). The problem is not the folder path (that problem was fixed first). I am a total amateur at this, so forgive my ignorance... any help would be greatly appreciated!

    Thanks,
    Monica

    Here's the script:
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-22-2010 at 02:35 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Script not identifying excel files?

    Hello mlf84,

    Welcome to the Forum!

    The code is correct up to where the new workbook is saved. You declare the file format as xlText which is an invalid file format constant. You can use: xlCSV, xlTextMac, xlTextPrinter, or xlTextWindows (click here for a full list of 2007 file formats). The most commonly used text file format is xlCSV.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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