Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using a macro to protect a sheet after the information update.

I have a form with 3 tabs on it. There are specific fields that they are
allowed to enter in their time. It is protected right now with a password and
my PMP team will use it to document time for their projects. After the
initial assessment of a project, my team runs a macro that takes the
protection off then deletes the range of cells that they were allowed to
enter their time and protects the entire worksheet. I have created a macro
to lock the entire sheet but I have been unable to protect the sheet using a
password inside of a macro. As the file stand now the customer can click on
tools/protection/unprotect and change any field they want. I created the
macro because my team members are not that excel savy.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Using a macro to protect a sheet after the information update.

Activesheet.Protect Password:="ABC"

protects the sheet with a password for me.

Activesheet.Unprotect Password:="ABC"

unprotects it after the password is applied.

--
Regards,
Tom Ogilvy


"Patrick Antus" wrote:

I have a form with 3 tabs on it. There are specific fields that they are
allowed to enter in their time. It is protected right now with a password and
my PMP team will use it to document time for their projects. After the
initial assessment of a project, my team runs a macro that takes the
protection off then deletes the range of cells that they were allowed to
enter their time and protects the entire worksheet. I have created a macro
to lock the entire sheet but I have been unable to protect the sheet using a
password inside of a macro. As the file stand now the customer can click on
tools/protection/unprotect and change any field they want. I created the
macro because my team members are not that excel savy.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Using a macro to protect a sheet after the information update.

Thank you Tom. I needed that "=". Excel help did not come close to helping
but you did.

"Tom Ogilvy" wrote:

Activesheet.Protect Password:="ABC"

protects the sheet with a password for me.

Activesheet.Unprotect Password:="ABC"

unprotects it after the password is applied.

--
Regards,
Tom Ogilvy


"Patrick Antus" wrote:

I have a form with 3 tabs on it. There are specific fields that they are
allowed to enter in their time. It is protected right now with a password and
my PMP team will use it to document time for their projects. After the
initial assessment of a project, my team runs a macro that takes the
protection off then deletes the range of cells that they were allowed to
enter their time and protects the entire worksheet. I have created a macro
to lock the entire sheet but I have been unable to protect the sheet using a
password inside of a macro. As the file stand now the customer can click on
tools/protection/unprotect and change any field they want. I created the
macro because my team members are not that excel savy.

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
Macro to update information if date changes Wundrfulthing New Users to Excel 1 November 6th 08 03:14 PM
Macro with protect sheet Pyrite Excel Discussion (Misc queries) 1 October 10th 08 05:03 PM
Protected Sheet doesn't update linked information Trainmaster Excel Discussion (Misc queries) 3 March 16th 07 06:50 PM
How to create a Macro to Copy Information in one sheet to another sheet. poppy Excel Programming 3 July 28th 04 07:26 AM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM


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