Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default macro to unlock worksheet

I want my macro to unlock the worksheet before it runs, and then lock it
again after.

At the moment I have Sheets("Daily Report").Select
wsheet.Unprotect Password:="computer"

however this is getting an error.

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default macro to unlock worksheet

Kirsty,

Do it like this

Sheets("Daily Report").Unprotect Password:="computer"
'do things
Sheets("Daily Report").Protect Password:="computer"

Mike

"Kirsty" wrote:

I want my macro to unlock the worksheet before it runs, and then lock it
again after.

At the moment I have Sheets("Daily Report").Select
wsheet.Unprotect Password:="computer"

however this is getting an error.

Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default macro to unlock worksheet

thanks, works perfectly

"Mike H" wrote:

Kirsty,

Do it like this

Sheets("Daily Report").Unprotect Password:="computer"
'do things
Sheets("Daily Report").Protect Password:="computer"

Mike

"Kirsty" wrote:

I want my macro to unlock the worksheet before it runs, and then lock it
again after.

At the moment I have Sheets("Daily Report").Select
wsheet.Unprotect Password:="computer"

however this is getting an error.

Any suggestions?

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
Unlock worksheet Gordy Excel Discussion (Misc queries) 3 November 12th 07 02:29 PM
How do I program a macro to unlock and relock an excel worksheet Dave Peterson Excel Programming 0 January 16th 07 10:26 PM
How do I program a macro to unlock and relock an excel worksheet Don Guillett Excel Programming 0 January 16th 07 10:26 PM
Unlock protected worksheet David Excel Programming 2 November 20th 05 09:09 AM
how do i password protect an .xls file? how do i unlock it for automation. e.g. want to unlock and access a .xls from another .xls macro. Daniel Excel Worksheet Functions 1 June 24th 05 02:59 PM


All times are GMT +1. The time now is 02:53 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"