Error causes Excel to shut down
After experimenting with this code further, I found out that if I run the program that writes code into the Sheet module at some point after the new "REPORT" sheet is created, it runs fine. Why? I don't know, just one of those things I guess
For anyone who is interested, my old code looked like
1. Replace any existing sheet named "REPORT" with a clean on
2. Write a small VBA "on event" program into the sheet module
3. Step 2 successful but fatal error resulted causing Excel to shut dow
Now my code looks something like
1. Replace any existing sheet named "REPORT" with a clean on
2. Do some formatting to the new shee
3. Do some other functions that add data to the new "REPORT" shee
4. Write a small VBA "on event" program into the sheet modul
5. Success - no error
|