Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splash Screen causes Excel to crash and send error report 1

Status
Not open for further replies.
Jun 12, 2003
25
US
This is driving me nuts. It happens maybe 1 out of 3 times I open the file. I have found two cases which cause excel to crash and want to send an error report to microsoft. The first one is when I open a file in which I have a splash screen set up according to the directions given on this page:


Excel will crash when the splash screen is supposed to close.

The other case is when I open a file that immediately pops up the userform1:

Code:
Private Sub Workbook_Open()
    UserForm1.Show
End Sub

Does anyone know why this is happening? Are there any suggestions for workarounds (short of deleting the code!)? I have downloaded all the latest Office and Windows updates and that didn't work.

Thanks,
Ben
 
Just a suggestion:

Try to load the form first, it might help.
Code:
Private Sub Workbook_Open()
    Load UserForm1
    UserForm1.Show
End Sub

I have the exact same "Splash Screen" set up in a number of my SS apps (with the Load in front thought) and I use Excel XP (SP1) and I haven't had a problem . . . yet.

I hope this helps.




Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Hey Mike,
I just tried that and I've opened the modified file about six times now and it crashes every other time. Any other suggestions?

I appreciate the help and realize that there may not be a solution to this problem. (I'm hoping somebody takes that as a challenge to 'solve the impossible') ;-)

Ben
 
I'm running Excel 2000 at work, but I've got XP at home. I will try to emulate the error.

Do you have any links to external workbooks?

What is the other form (not the Splash Screen) supposed to do when it opens?

How big are the files, and were they created in XP, or an earlier version of Excel?



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Hey Mike,
There are no links to external workbooks. The form does this.

Code:
Private Sub UserForm_Initialize()
'from j-walk.com
    Call UpdateChart 
'clears contents of specified cells
    Call Module_Clear_Contents.Clear_Contents 
End Sub

I've tried removing UpdateChart, putting clear_contents in the ThisWorkbook code before I load the form and turning off screenUpdating before and after clear_contents but to no avail.
The file is about 130 KB. I really appreciate your help. The file with the splash screen hasn't crashed anymore so we're making progress. I don't know why the one that is simply supposed to show the userform is still crashing. Maybe I'll add the splash screen to it and it will work! Or if I hold my tongue the right way... Arrg!

Ben
 
Try adding

Code:
Application.Wait (Now + TimeValue("00:00:02"))

above the

Code:
Call UpdateChart
.

I can't think of anything else other than giving Excel time to finish up some background stuff before giving it more to do.

I hope this helps!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
I have been having the same thing happen to me for awhile, too... I tried adding the Load UserForm1 per Mike's suggestion, and it seems to be working. A star from me! Thanks!

Glenn
 
Thanks for the star, I'm glad I could help! [wavey]

I'm still wondering if the Wait method worked for navyguysrighthandman though.

Thanks again!

Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Nope. I added just where you told me to but it still crashes. These files were created and run in Excel 2002 on the same computer so there isn't any compatibility problems. I really appreciate you sticking with me on this Mike! At least you've helped somebody. If you have an epiphany overnight then let me know.
thanks,
Ben
 
hey navyguysrighthandman,

You should try to remove the to module Calls from the UserForm_initialize procedure and add an "Update Chart" button to the UserForm. Put the code that you have in the Initialize procedure into the "Update Chart"'s Click procedure.

I'm thinking that Excel can't handle the code for everything you want to do in the Initialize procedure at the same time it is loading the UserForm into memory.

I'm sorry if this isn't what you wanted, but I can't hink of anything because I have been unable to emulate the crash you are having. I can only assume.

I hope "this" helps!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Maybe it's just my computer. I've tried removing everything from the Userform_initialize procedure but it still crashes. Well I guess we'll never find a solution to this one, it must be impossible. I really appreciate the help though. I'm just going to have to go with a button on a spreadsheet that starts the userform instead of it being automatic. It doesn't crash that way.
Thanks,
Ben
 
I will keep a look out for a solution and I will let you know if I find one!

Sorry I couldn't help!

One last suggestion though. You might want to try an Office Update!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top