#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default Format Icon

I have a workbook with 5 sheets and 5 userforms. The user is supposed to
have access to 1 form. All the sheets are locked or unlocked as required to
perform various proceedures. Only the administrator should have access to
the various sheets and input forms. This access is password protected. The
code I used to lock everything was:

ActiveSheet.Protect Password:=TheWord, Contents:=True, Scenarios:=True, _
DrawingObjects:=True
ActiveSheet.Unprotect Password:=TheWord

The problem is, the Format Icon on the Excel toolbar is still active which
gives the user access to 'unhide sheets' This exposes the other sheets
which are locked, but the command buttons are now visible and active which
gives the user full access to everything.

Is there code I can add to mine so I can deactivate the Format icon to limit
user acess?

Thanks for the help.
Doug
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Format Icon

You are protecting the active sheet, not *all* sheets... the protection only
applies to that one sheet. What you need to do is protect the workbook
structure as well. Try something like this...

ThisWorkbook.Protect Password:=TheWord, Structu=True

That should stop the user from being able to hide/unhide (or even move) the
worksheets.

--
Rick (MVP - Excel)


"Doug" wrote in message
...
I have a workbook with 5 sheets and 5 userforms. The user is supposed to
have access to 1 form. All the sheets are locked or unlocked as required
to
perform various proceedures. Only the administrator should have access to
the various sheets and input forms. This access is password protected.
The
code I used to lock everything was:

ActiveSheet.Protect Password:=TheWord, Contents:=True, Scenarios:=True, _
DrawingObjects:=True
ActiveSheet.Unprotect Password:=TheWord

The problem is, the Format Icon on the Excel toolbar is still active which
gives the user access to 'unhide sheets' This exposes the other sheets
which are locked, but the command buttons are now visible and active which
gives the user full access to everything.

Is there code I can add to mine so I can deactivate the Format icon to
limit
user acess?

Thanks for the help.
Doug


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default Format Icon

Protecting the Workbook limits the Format button, but now the sheet is so
locked up, non of my other proceedures work. It looks like I will have to
unlock the workbook for each proceedure, then relock it at the end of each
Sub. Is there an easier way to do this? Can I just disable the Format icon?

Doug

"Rick Rothstein" wrote:

You are protecting the active sheet, not *all* sheets... the protection only
applies to that one sheet. What you need to do is protect the workbook
structure as well. Try something like this...

ThisWorkbook.Protect Password:=TheWord, Structu=True

That should stop the user from being able to hide/unhide (or even move) the
worksheets.

--
Rick (MVP - Excel)


"Doug" wrote in message
...
I have a workbook with 5 sheets and 5 userforms. The user is supposed to
have access to 1 form. All the sheets are locked or unlocked as required
to
perform various proceedures. Only the administrator should have access to
the various sheets and input forms. This access is password protected.
The
code I used to lock everything was:

ActiveSheet.Protect Password:=TheWord, Contents:=True, Scenarios:=True, _
DrawingObjects:=True
ActiveSheet.Unprotect Password:=TheWord

The problem is, the Format Icon on the Excel toolbar is still active which
gives the user access to 'unhide sheets' This exposes the other sheets
which are locked, but the command buttons are now visible and active which
gives the user full access to everything.

Is there code I can add to mine so I can deactivate the Format icon to
limit
user acess?

Thanks for the help.
Doug



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
Auto Format icon cvgairport Excel Discussion (Misc queries) 3 April 1st 10 03:30 PM
remove Format painter icon on speardsheet Richard Excel Discussion (Misc queries) 2 August 19th 09 07:09 PM
Format Icon EricG Excel Programming 0 June 8th 09 05:58 PM
Using Conditional Format/Icon Set With Dates Steve Excel Worksheet Functions 0 September 17th 08 04:44 PM
How do I format the Currency Icon in Excel 2007? redant Setting up and Configuration of Excel 0 July 31st 07 09:56 PM


All times are GMT +1. The time now is 04:28 PM.

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"