works in Xl2000 but notXl97 - help required

  • Thread starter Thread starter N E Body
  • Start date Start date
N

N E Body

Hi

The following line works in Excel 2000 but gives an error in Excel 97

Sheets("Summary").Unprotect password:="cockroach"

Could someone give me the 97 code?

Kenny
 
Hi Kenny,

How are you running this code?

In xl97, if it is run from a commandbutton, you should change the
takefocusonclick property of the commandbutton to False.
 
Norman

The code IS run from a commandbutton on the sheet but I cannot find the
property to change.
Ive opened VBE and have the properties box open but I cannot find any
reference to takefocusonclick
I presume this is what you mean or do I have to write it in code?

Kenny
 
Sorry Norman

Ignore the last post i've found it!! I had the sheet protected and all
became clear when I lifted the protection!

Many thanks

Kenny
 
Back
Top