Results 1 to 5 of 5
  1. #1
    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

    Corrupted VBA project (I think) (2000)

    <P ID="edit" class=small>Edited by MichaelRead on 17-Nov-01 07:00.</P>Hi all,

    Have been working on and off a 5meg workbook for a year and one-half now. Have updated and improved it as I learned more and conditions changed.

    Funny thing is (actually not very funny), is that I can open the workbook fine, however when I try to open the VBA project I get an illegal operation message.

    I have opened another instance of Excel and I can open the VBA project for the new book (Book 1) just fine. When I try to open the workbook which I have been working on, I get an "Automation" message which tells me that Excel cannot find the proper libraries to open the project (I think).

    When I try "Detect and Repair" from within the workbook in question, Excel locks up and requires the three-fingered salute to exit. I have run "Detect and Repair" twice from within a new workbook. I have also completely reinstalled Office 2000 after running "Detect and Repair" twice.

    Any ideas? Virus? Corrupted project?...

    Just another note on this...if I open another workbook and then open the "failed" workbook, I can get to the VB Editor. However, I cannot see the project for the "failed" workbook in the project explorer. I know the code has to still be there, because I have several worksheet activate/deactivate events and also a toolbar which is created on workbook open. The toolbar is still there and seems to work fine...

    Thanks,

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Corrupted VBA project (I think) (2000)

    I've had similar problems in the past.

    I saved my Excel projact as HTML. In Excel 2000, it saves it complete- macros and all (this is not the case in Excel 97). I closed Excel, opened the HTML, and saved it as a new spreadsheet. That seemd to get rid of whatever internal corruption was in there.

    It was a desperation measure for me, but it did seem to work.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    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: Corrupted VBA project (I think) (2000)

    Thanks Geoff,

    In the meantime, I have...

    Uninstalled Office 2000
    Ran AdAware5.5
    Ran two online virus checkers (both of which found JS_Nimda_A
    Cleaned all the bs out of my system which has accumulated
    Run RegVac and Registry Healer twice
    Defragged the hard drive
    And...will reinstall Office 2000 as soon as my processor quits gasping for air.

    Will try your approach if I still cannot open it after all of the above...thanks.

  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: Corrupted VBA project (I think) (2000)

    Ok Geoff,

    I tried your suggestions, but due to my brilliance <img src=/S/sarcasm.gif border=0 alt=sarcasm width=15 height=15> in using the sheet activate and deactivate events to ensure that the user cannot access an unprotected sheet, I could not save as HTML because the code reprotects the sheets. I could not access the code to disable the events because I cannot get into the project.

    Finally, I set security to high and disabled all the macros. With this, I could get to the VBE and I can see the project and code. <img src=/S/joy.gif border=0 alt=joy width=23 height=23>

    Any ideas on what might be causing the project to "disappear" when running normally (macros enabled)?

    Thanks,

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

    Re: Corrupted VBA project (I think) (2000)

    Open Excel, then use File/Open. Navigate to the file and select it. Then hold down the Shift key when you press the Open button and hold it down until the file is open. If you get the dialog box asking if macros should be enabled, click No. If you don't get this dialog, then after the file is open select Tools/Macro then click on security and set your security to at least medium, close the file and open it again using the above procedure. At this point, you can try opening the VBA Editor again. If it opens, then you can do whatever you want to do. If it does not open, then go through the above procedure to open the file again, and this time try to do the SaveAs to HTML.
    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
  •