views:

101

answers:

2

Hi

Excel 2003 (11.8316.8221) SP3 on Windows XP - KB973475

When the my Excel VBA application starts it activates the first sheet in the workbook but shows portions of the second and third sheet "bleeding" into the first sheet. This is easily worked around by say minimising and maximising the workbook or causing it to repaint in some other way. After the repaint the first sheet shows correctly in full.

a) Has an update to Excel been issued which fixes this problem? b) Can you think of a good workaround (given the details below)?

The workbook is a VBA application which has worked well for a number of years. It has broken as described above since an update to Excel in mid-October. The broken build is 11.8316.8221 SP3.

In the workbook open event a number of sheets are unprotected and then protected (for drawing objects and scenarios). If this functionality is commented out then the problem goes away. This behaviour looks shoddy and is difficult to explain to the application's customers.

Thanks for your help.

I see elsewhere that this relates to KB973475 patch. It is not yet clear whether MSoft are going to fix. The only suggested solution is to uninstall the patch.

A: 

Strange problem. I recall a similar thing happening with listviews within tab controls in access. Try forcing a repaint of the screen and/or flicking from one sheet to another (in code) to see if that helps

Kevin Ross
A: 

If I programatically minimise and maximise the active workbook then this corrects the screen corruption. The code is executed in a timer event handler and the timer event is kicked off from the Workbook_Open procedure - it does not work if executed directly from the Workbook_Open procedure.

The minimise-maximise code is at microsoft.public.excel.programming http://groups.google.co.uk/group/microsoft.public.excel.programming/browse%5Fthread/thread/40f351dbc7f293af?pli=1

Thanks to Peter T on the Excel forum and my colleague Andy Smith.

mikemay