S
Steve Smithfield
The security patch released on 11th November for Excel 2007 causes a
significant problem with Excel 2007 VBA applications.
The bug is related to protecting and unprotecting worksheets.
The statements ActiveSheet.Protect and ActiveSheet.Unprotect work fine.
However the statement Application.Worksheets("worksheet name").Protect no
longer works correctly. Whilst it protects the sheet (and the unprotect
statement unprotects the sheet) it causes content from sheets which are not
selected to bleed into the selected sheet. So if you run a VBA macro, eg by
pressing a button on a sheet, and the macro runs the
Application.Worksheets("worksheet name").Protect statement bits of other
non-selected sheets bleed in the currently selected sheet.
It's clearly an Excel bug as all content which has bleeded into the sheet
will vanish if you simply minimize the workbook and immediately maximize it
again. Or simply select another sheet then go back to the original sheet.
ie it's cosmetic but you end up with a hell of a mess.
I have tested this with multiple Excel applications on Windows XP (Dell
desktop) and Vista. (Acer laptop).
I removed KB973593 and the problem vanished.
I re-installed KB973593 and the problem came back.
It's obviously possible to work around the problem, but when you have a
large number of applications it's a lot of work. Given protecting sheets
this way is very common and perfectly good practice I hope Microsoft can
issue a fix ASAP.
significant problem with Excel 2007 VBA applications.
The bug is related to protecting and unprotecting worksheets.
The statements ActiveSheet.Protect and ActiveSheet.Unprotect work fine.
However the statement Application.Worksheets("worksheet name").Protect no
longer works correctly. Whilst it protects the sheet (and the unprotect
statement unprotects the sheet) it causes content from sheets which are not
selected to bleed into the selected sheet. So if you run a VBA macro, eg by
pressing a button on a sheet, and the macro runs the
Application.Worksheets("worksheet name").Protect statement bits of other
non-selected sheets bleed in the currently selected sheet.
It's clearly an Excel bug as all content which has bleeded into the sheet
will vanish if you simply minimize the workbook and immediately maximize it
again. Or simply select another sheet then go back to the original sheet.
ie it's cosmetic but you end up with a hell of a mess.
I have tested this with multiple Excel applications on Windows XP (Dell
desktop) and Vista. (Acer laptop).
I removed KB973593 and the problem vanished.
I re-installed KB973593 and the problem came back.
It's obviously possible to work around the problem, but when you have a
large number of applications it's a lot of work. Given protecting sheets
this way is very common and perfectly good practice I hope Microsoft can
issue a fix ASAP.