View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Ant Ant is offline
external usenet poster
 
Posts: 53
Default protecting sheet tabs

Sorry Dave but I should have been clearer in my last post.

I am trying to hide the worksheet Tabs so they are not visible to the user.
Not trying to hide the worksheets, just trying to hide the tabs

I have found a workaround. If I hide the ribbon and the formula bar, then
there is no way the user can get into the Excel options to turn on Tabs
again. This an even better option because my workspace has increased and the
user now has no option but to use only the buttons provided.

Thanks
Anthony


"Dave Peterson" wrote:

Did you allow macros to run?

If you run the Auto_Open procedure yourself--just open the VBE and select that
procedure and F5, does it work?

Ant wrote:

Hi Dave,

I have tried using your two Macros to hide the Tabs in my workbook. I have
placed the two macros in a Module (module 12), but nothing seems to happen. I
save and close the workbook, but when I re-open it, the tabs are still there.

Have I placed the macros in the wrong area?

Regard
Ant

"Dave Peterson" wrote:

You could have two macros placed in a General module for the workbook that you
want to lock down.

Option Explicit
Sub Auto_Open()
Application.Commandbars("Tools").Controls("&Option s...").Visible = False
End Sub
Sub Auto_Close()
Application.Commandbars("Tools").Controls("&Option s...").Visible = True
End Sub

The Auto_Open routine will run each time the workbook is opened (if the user
allows macros to run). And it'll hide the options choice.

The Auto_Close routine will run when the workbook is closed.



Benijofar Dave wrote:

Should this work in 2003 if so where should it be placed, thanks in advanvce.

"Tom Ogilvy" wrote:

to the best of my knowledge, this is not something you can prevent.

Removing the options menu seems a little drastic, but

Application.Commandbars("Tools").Controls("&Option s...").Visible = False

--
Regards,
Tom Ogilvy




"Mike" wrote:

I don't think this helps because I'm not trying to hide the sheet. What I'm
trying to do is hide the sheet tab only and stop users un-hiding the tabs

--

Dave Peterson
.


--

Dave Peterson
.