At the end of my rope-getting THIS PROG HAS PERFORMED AN ILLEGAL OP. WILL BE SHUT DOWN


Posted by miktek on April 10, 2001 4:19 PM

I know this is a longshot but maybe this has happened to someone else. I'm working in VBA (XL97) with 1 workbook with multiple sheets. Everything is fine until one of my latest revs to the software did something very bad. Whenever I try to compile from within the VBA window I get"the This program has performed an illegal op and will be shutdown" When looking at details of the error it says "EXCEL caused an invalid page fault in module VBA332.DLL at 017f:651b41d3." So I look this up at the Microsoft site and find this link that talks about and error with a deleted or moved sheet. I've taken the rev all the way back but I still get the error with this file. Anyway this post is too long so if anyone's knows anything I'm desperate.

Posted by Dave Hawley on April 10, 2001 8:40 PM

Hi miktek

It quite possible you have a corrupt module. Below are some methods to reduce file size that will also apply to a corrupt Workbook. The only thing in your case is I would copy and paste your code into NEW modules in a NEW workbook first

Here are some methods to reduce file size.

1. Save as "Microsoft Excel Workbook" as apposed to 97/95.

2. Open the VBE and Export all Modules and Forms to your hard drive (right click on them and select Export). Then delete all Modules and Forms in your Workbook. Now Import all Forms and Modules from your hard drive back in.


3.Right Click on any sheet name tab and select "Move or Copy". From the "To book" select "(new book)". Select the "Create a copy" box and click OK. Now save this new book as any name and go to File>Properties|General and see how much the new workbook has increased in size. Do the same for all sheets.

If a sheet causes an unreasonable increase in file size then it is probably corrupt. Try highlight all the data on the sheet and then copy it to a new sheet. If still no change then copy small areas at a time, save and check file size. This will narrow down any corrupt data, which will need re-doing.

Dave
OzGrid Business Applications

Posted by miktek on April 10, 2001 8:59 PM

As always Dave, your suggestions are excellent. I think I was able to fix it by importing modules into a new workbook. Wish I knew for sure how it happened.
Thanks Again.
miktek



Posted by Dave Hawley on April 10, 2001 9:09 PM


That's a question I would love to know the answer to as well :o)

Dave
OzGrid Business Applications