Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default is it possible to record a macro that would lock a sheet

hi again
is there a way to have macro lock a specific sheet for editing when the
macro is run, then maybe have it password protected for editing afterwards
thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default is it possible to record a macro that would lock a sheet

When a macro runs the sheet is already effectively locked. You can protect
it afterwards with

worksheets("Sheet1").Protect

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"des-sa" wrote in message
...
hi again
is there a way to have macro lock a specific sheet for editing when the
macro is run, then maybe have it password protected for editing afterwards
thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default is it possible to record a macro that would lock a sheet

Hi Bob,

Following on from that, how would you code it to protect all sheets in the
workbook?

Cheers
--
Deirdre


"Bob Phillips" wrote:

When a macro runs the sheet is already effectively locked. You can protect
it afterwards with

worksheets("Sheet1").Protect

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"des-sa" wrote in message
...
hi again
is there a way to have macro lock a specific sheet for editing when the
macro is run, then maybe have it password protected for editing afterwards
thanks




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default is it possible to record a macro that would lock a sheet

Just loop them all

For Each sh In Activeworkbook.Worksheets

sh.Protect
Next sh

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Diddy" wrote in message
...
Hi Bob,

Following on from that, how would you code it to protect all sheets in the
workbook?

Cheers
--
Deirdre


"Bob Phillips" wrote:

When a macro runs the sheet is already effectively locked. You can
protect
it afterwards with

worksheets("Sheet1").Protect

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"des-sa" wrote in message
...
hi again
is there a way to have macro lock a specific sheet for editing when the
macro is run, then maybe have it password protected for editing
afterwards
thanks






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default is it possible to record a macro that would lock a sheet

Thank you Bob :-)
--
Deirdre


"Bob Phillips" wrote:

Just loop them all

For Each sh In Activeworkbook.Worksheets

sh.Protect
Next sh

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Diddy" wrote in message
...
Hi Bob,

Following on from that, how would you code it to protect all sheets in the
workbook?

Cheers
--
Deirdre


"Bob Phillips" wrote:

When a macro runs the sheet is already effectively locked. You can
protect
it afterwards with

worksheets("Sheet1").Protect

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"des-sa" wrote in message
...
hi again
is there a way to have macro lock a specific sheet for editing when the
macro is run, then maybe have it password protected for editing
afterwards
thanks








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default is it possible to record a macro that would lock a sheet

This was a very helpful post. I was wondering if it's possible to create a
macro that would protect all the worksheets in the workbook but also allow
users to edit a certain range?

Thanks,
EugeniaP.

"Diddy" wrote:

Thank you Bob :-)
--
Deirdre


"Bob Phillips" wrote:

Just loop them all

For Each sh In Activeworkbook.Worksheets

sh.Protect
Next sh

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Diddy" wrote in message
...
Hi Bob,

Following on from that, how would you code it to protect all sheets in the
workbook?

Cheers
--
Deirdre


"Bob Phillips" wrote:

When a macro runs the sheet is already effectively locked. You can
protect
it afterwards with

worksheets("Sheet1").Protect

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"des-sa" wrote in message
...
hi again
is there a way to have macro lock a specific sheet for editing when the
macro is run, then maybe have it password protected for editing
afterwards
thanks






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
Duplicate sheet, autonumber sheet, record data on another sheet des-sa[_2_] Excel Worksheet Functions 0 May 8th 08 06:56 PM
Record New Macro ju1eshart Setting up and Configuration of Excel 3 August 25th 06 04:21 PM
lock tab in sheet 2 until cell in sheet one is completed john tempest Excel Worksheet Functions 7 November 24th 05 08:45 AM
how do i create a record sheet jen New Users to Excel 1 September 19th 05 02:33 PM
Service record sheet kevhatch Excel Discussion (Misc queries) 4 August 24th 05 03:05 PM


All times are GMT +1. The time now is 04:22 AM.

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

About Us

"It's about Microsoft Excel"