Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Protect/Unprotect workbook

Hi,

My apologies if this is a repeat request, but I couldn't find any answers
for my dilema.

I can write the VB to protect the complete workbook, however I just want to
protect 4 out of ten worksheets, despite that all worksheets are hidden for
start bar 1 (Main).

I was wondering if there is anyone there which could help me.

Many Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Protect/Unprotect workbook

Hi,

Your question is a bit confusing you mention bot protecting and hiding
worksheets and I'm not sure which you want so here's a routine for each


To hide named sheets
Sub nn()
ShtData = "Sheet1,Sheet2" 'add sheet names as required
MySheet = Split(ShtData, ",")
For x = 0 To UBound(MySheet)
Sheets(MySheet(x)).Visible = False
Next
End Sub

to protect bamed sheets
Sub bb()
ShtData = "Sheet1,Sheet2" 'add sheet names as required
MySheet = Split(ShtData, ",")
For x = 0 To UBound(MySheet)
Sheets(MySheet(x)).Protect Password:="MyPass"
Next
End Sub

Mike


"Vitordf" wrote:

Hi,

My apologies if this is a repeat request, but I couldn't find any answers
for my dilema.

I can write the VB to protect the complete workbook, however I just want to
protect 4 out of ten worksheets, despite that all worksheets are hidden for
start bar 1 (Main).

I was wondering if there is anyone there which could help me.

Many Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Protect/Unprotect workbook

Check your other post.

Vitordf wrote:

Hi,

My apologies if this is a repeat request, but I couldn't find any answers
for my dilema.

I can write the VB to protect the complete workbook, however I just want to
protect 4 out of ten worksheets, despite that all worksheets are hidden for
start bar 1 (Main).

I was wondering if there is anyone there which could help me.

Many Thanks in advance


--

Dave Peterson
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/unprotect ALL worksheets in workbook ? Newsgal Excel Discussion (Misc queries) 5 May 4th 10 06:20 PM
Protect/unprotect a formula The Wabster Excel Worksheet Functions 1 April 12th 09 11:37 AM
Protect, unprotect Pyrite Excel Discussion (Misc queries) 0 August 15th 08 03:18 PM
Protect/unprotect all sheets at once? wx4usa New Users to Excel 4 July 22nd 08 12:08 AM
Macros for Protect/Unprotect all sheets in a workbook Paul Sheppard Excel Discussion (Misc queries) 2 August 4th 05 04:30 PM


All times are GMT +1. The time now is 08:29 AM.

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"