Completely lock down Tab against Usage

bradjedis
4StarLounger
Posts: 538
Joined: 30 Mar 2010, 18:49
Location: United States

Completely lock down Tab against Usage

Post by bradjedis »

Hi folks,

New to this forum, (xfer from Woody's)

I have a situation where I need to completly lockdown a tab from everyone except for me. The tab contains text and a clickable button. I am able to lockdown everything but the button.

Using Excel 2007, so when the protect dialog box appears, I know to NOT click any of the check boxes. However, I cannot figure out how to disallow anyone from clicking the button.

Any Ideas?

Thanks Brad

Oh yea, Hello Hans! good to find you again....

User avatar
HansV
Administrator
Posts: 78509
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Completely lock down Tab against Usage

Post by HansV »

Hi Brad,

Welcome to Eileen's Lounge!

This behavior is by design - when a sheet is protected (and the "edit controls" check box is clear), the user can't change the properties of controls, but he/she can still use (=click) them.
So you'll have to check whether the sheet is protected in the code that is executed when the button is clicked, e.g.

Code: Select all

If ActiveSheet.ProtectContents = False Then
  ' Sheet is not protected, action allowed
  ...
  ...
Else
  ' Sheet is protected, action not allowed
  Beep
End If
Best wishes,
Hans

bradjedis
4StarLounger
Posts: 538
Joined: 30 Mar 2010, 18:49
Location: United States

Re: Completely lock down Tab against Usage

Post by bradjedis »

Hans,
Thanks man, I will give it a go.

Brad

bradjedis
4StarLounger
Posts: 538
Joined: 30 Mar 2010, 18:49
Location: United States

Re: Completely lock down Tab against Usage

Post by bradjedis »

Worked great !

thanks,
Brad