ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Protecting/Unprotecting all sheets with macro leads to "image" iss (https://www.excelbanter.com/excel-worksheet-functions/256836-protecting-unprotecting-all-sheets-macro-leads-image-iss.html)

Miker

Protecting/Unprotecting all sheets with macro leads to "image" iss
 
After I run the macro code (see below) to protect or unprotect all sheets
images from other areas of the spreadsheet appear at random when I start to
input in cells. They go away if you page down and up again or leave the
sheet and come back. I tested this on other computes and I get the same
effect. I am running Excel 2007 but the file is in 2003 format (not all
users are on 2007). I did save the file in 2007 macro-enabled format and
have the same issues.

Code:
Sub Unprotect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="password"
Next ws
End Sub

Sub Protect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:="password"
Next ws
End Sub


Miker

Protecting/Unprotecting all sheets with macro leads to "image" iss
 
I copied the same code into another (older) Excel file and get the same
problem. Looks like it might be a conversion issue to 2007???

Any insight would be greatly appreciated.

"MikeR" wrote:

After I run the macro code (see below) to protect or unprotect all sheets
images from other areas of the spreadsheet appear at random when I start to
input in cells. They go away if you page down and up again or leave the
sheet and come back. I tested this on other computes and I get the same
effect. I am running Excel 2007 but the file is in 2003 format (not all
users are on 2007). I did save the file in 2007 macro-enabled format and
have the same issues.

Code:
Sub Unprotect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="password"
Next ws
End Sub

Sub Protect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:="password"
Next ws
End Sub


Gord Dibben

Protecting/Unprotecting all sheets with macro leads to "image" iss
 
Probably the result of the security updates on November 10th, 2009

KB973593 affected 2007 and KB973475 affected 2003

Thhere is a hotfix for 2007

KB973593 / 2007 hotfix

978522 Description of the Office Excel 2007 hotfix package
(Excel-x-none.msp, Xlconv-x-none.msp): December 23, 2009

http://support.microsoft.com/default...b;EN-US;978522

I don't know if there was a hotfix for KB973475


Gord Dibben MS Excel MVP


On Fri, 19 Feb 2010 11:28:08 -0800, MikeR
wrote:

I copied the same code into another (older) Excel file and get the same
problem. Looks like it might be a conversion issue to 2007???

Any insight would be greatly appreciated.

"MikeR" wrote:

After I run the macro code (see below) to protect or unprotect all sheets
images from other areas of the spreadsheet appear at random when I start to
input in cells. They go away if you page down and up again or leave the
sheet and come back. I tested this on other computes and I get the same
effect. I am running Excel 2007 but the file is in 2003 format (not all
users are on 2007). I did save the file in 2007 macro-enabled format and
have the same issues.

Code:
Sub Unprotect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="password"
Next ws
End Sub

Sub Protect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:="password"
Next ws
End Sub



Miker

Protecting/Unprotecting all sheets with macro leads to "image"
 
The hotfix seems to have worked. Thank you very much!

"Gord Dibben" wrote:

Probably the result of the security updates on November 10th, 2009

KB973593 affected 2007 and KB973475 affected 2003

Thhere is a hotfix for 2007

KB973593 / 2007 hotfix

978522 Description of the Office Excel 2007 hotfix package
(Excel-x-none.msp, Xlconv-x-none.msp): December 23, 2009

http://support.microsoft.com/default...b;EN-US;978522

I don't know if there was a hotfix for KB973475


Gord Dibben MS Excel MVP


On Fri, 19 Feb 2010 11:28:08 -0800, MikeR
wrote:

I copied the same code into another (older) Excel file and get the same
problem. Looks like it might be a conversion issue to 2007???

Any insight would be greatly appreciated.

"MikeR" wrote:

After I run the macro code (see below) to protect or unprotect all sheets
images from other areas of the spreadsheet appear at random when I start to
input in cells. They go away if you page down and up again or leave the
sheet and come back. I tested this on other computes and I get the same
effect. I am running Excel 2007 but the file is in 2003 format (not all
users are on 2007). I did save the file in 2007 macro-enabled format and
have the same issues.

Code:
Sub Unprotect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="password"
Next ws
End Sub

Sub Protect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:="password"
Next ws
End Sub


.



All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com