Code Glitch from version to version

G

Guest

Sub Run_Update1()
Application.ScreenUpdating = False
Sheets("Sheet1").Unprotect Password:="George"

Why does this code work fine in all Excel versions except Windows 95 Excel
97? It freezes at the Unprotect line. I have about 200 computers running
this and about 5 run Windows 95 and Excel 97. The rest run version 2000 or
better. On all the 95/97 computers the code freezes at the Unprotect line of
code???
 
K

Ken Macksey

Hi

Not really sure what the problem is, but I have run into errors with
protecting in excel 97 on occasion. I have found that if you select a cell
first, you don't get those occasional errors. I know you are not supposed to
have to select and selecting slows things down, but this is just my personal
experience with excel 97.

Sub Run_Update1()
Sheets("Sheet1").Range("a1").select
Application.ScreenUpdating = False
Sheets("Sheet1").Unprotect Password:="George"

if doing additional sheets, select a cell on the next sheet as well like


Sub Run_Update1()

Application.ScreenUpdating = False
Sheets("Sheet1").Range("a1").select
Sheets("Sheet1").Unprotect Password:="George"

Sheets("Sheet2").Range("a1").select
Sheets("Sheet2").Unprotect Password:="George"
Application.ScreenUpdating = True


HTH

Ken
 
G

Guest

This is worth a try and is probably just "silly" enough to work. Thanks for
the pointer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top