Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro to protect with pword in 97

I've coded in excel xp, but it does not work if I open it
in excel 97. The code unprotects a page with a passowrd,
changes some things, then protects it again. The code to
protect I used was:

Worksheets("Student List").Unprotect Pword
.... some code ...
Worksheets("Student List").Protect password:=Pword

(Where Pword is a string constant)

What do I need to change so that it works in 97?

Thanks for any help you can give me.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to protect with pword in 97

If you are running it from a comandbutton, then change the TakeFocusOnClick
property to False.

--
Regards,
Tom Ogilvy

"Wes" wrote in message
...
I've coded in excel xp, but it does not work if I open it
in excel 97. The code unprotects a page with a passowrd,
changes some things, then protects it again. The code to
protect I used was:

Worksheets("Student List").Unprotect Pword
... some code ...
Worksheets("Student List").Protect password:=Pword

(Where Pword is a string constant)

What do I need to change so that it works in 97?

Thanks for any help you can give me.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect then reprotect using macro checkQ Excel Discussion (Misc queries) 2 October 13th 07 05:12 PM
Protect macro from stopping saman110 via OfficeKB.com Excel Discussion (Misc queries) 1 August 16th 07 08:22 PM
Protect macro for unauthorised use Johan_vl2431 Excel Discussion (Misc queries) 2 May 3rd 07 04:56 PM
Protect macro ST Excel Discussion (Misc queries) 1 June 6th 06 06:26 PM
How to protect my macro Protect & Unprotect Several Worksheets Excel Discussion (Misc queries) 1 January 7th 05 02:01 AM


All times are GMT +1. The time now is 11:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"