0
votes

I hope someone can help me with this issue as it is so random and strange that I almost don't know how to describe it.

I recently have an issue with the screen staying frozen. The code I have written works perfectly fine on all of our office PC at work. On the workbookOpen process the workbook is updating external queries and gets data from external sheets and copy and pastes it into the workbook. On code completion it activates a welcome screen (just a formatted excel sheet) and goes to full screen, turning ribbon, grid, tabs ... off. The welcome screen is nothing else than a grey excel sheet with 5 activeX controls. The Application is used to create door component cutting lists for our production staff.

There is no error shown thru the startup process and even stepping thru the code seems that everything is running normal. Now the Application has become a considerable size of 13MB and is still growing. There is only 15 worksheets with plain +,-,/,* formulas and a couple lookups. Almost all cell have name ranges (around 350 so far) and conditional formatting. From my experience this adds up to around 5-6MB and the rest is VBA. So yes, it is considerable but not over the top in size.

This is the issue we experiencing lately: Randomly some PC's freeze during startup process and only a excel shutdown will solve this issue. When the sheet is going into full screen it cut everything of that was behind the task bar leaving a big white bar. By randomly I mean that everything was fine just 5min ago and all over sudden its not. Even a restart of the workbook creates the same issue. We are running 32bit and 64 without any issues. At this point we are completely in the dark as a reinstall of Office fixed the issue for some but not for others. I just had this issue on my computer today running 32bit and after hours of research I decided to force an office update. This fixed it for me but again, others are not that lucky.

Now I know that you will probably ask me for code but I honestly would not even know which one to post. I'm almost 100% certain that this is not a code issue but more an office/excel issue. Unfortunately I'm the one that needs to fix it but I don't know what to fix if nothing is broken. Anything I've tried had no result. This started from adding doEvents to changing security settings and updating/reinstalling office.

If there is anybody out there that can help me with this or even put me in the right direction that would be much appreciated.

Thanks

Rebuild the workbook from scratch, worksheet by worksheet, module by module!simple-solution
As it is impossible to say what is really going on, the only thing I see is you could add a logging routine: call the routine with a string as parameter. In the routine, open a logfile for append, add the text together with a timestamp and close it again. When Excel hangs, have a look into the logfile to identify if a certain command is causing the trouble.FunThomas