Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    run time error (97 and 2000)

    I have an excel file that was just accessed last week. I am trying to access it now and get "file format is not valid". I also get run time error 1004. I hit debug and it points to "Application.Dialogs(xlDialogOpen).Show". Is the file corrupt or does anyone know what the problem is?

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: run time error (97 and 2000)

    Linda

    I guess I maybe the barer of bad news, but it is time to rebuild that workbook. I would also suggest not to save it, but save a copy of it, and leave the "engine" workbook intact.

    Sorry but the line Application.Dialogs(xlDialogOpen).Show should work in a healthy workbook, unless someone tells us otherwise.

    Good luck, and if you need any help let us know.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: run time error (97 and 2000)

    When you say rebuild that workbook - do you mean I lost all the data it contained? Is there any way to save the file?

  4. #4
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: run time error (97 and 2000)

    Hi Linda,

    Is it possible you are trying to open a 2000 file with 97? Shot in the dark because I don't really remember that much about 97, but could be that whatever context the statement identified with debug is used in is not valid. Worth a try anyway. <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15>

  5. #5
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: run time error (97 and 2000)

    Linda

    No rebuilding means making a fresh copy out of it. Its very tedious and is error prone, but basically you will copy all the worksheets into a new workbook, and export all the VBA code modules and re-import them into the new workbook, and things like that.


    There are some utilities, like the CodeCleaner from Rob Bovey. contact Rob Bovey for a copy.

    Let me know if you need additional help.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

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

    Re: run time error (97 and 2000)

    One suggestion. Start Excel and go to the File Open dialog. Navigate to the file in qustion and select it. Hold down the Shift key and press the Open button. Hold the shift key down until the workbook either opens or the open fails. If this allows you to open the workbook, then you can look in the Auto macros for what might be causing the problem. However, before I did that, I would copy as much of the workbook as possible and paste it into an new workbook (don't paste any Auto macro code back into the Auto routines).

    If that does not allow you to open the workbook, then I am afraid you are looking at manually recreating the workbook if you don't have a backup.
    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
  •