deactivating menus

Peter99

New Member
Joined
Mar 31, 2002
Messages
7
I have a worksheet that I do not want the user to change by being able to access menu or sheet options

can anyone HELP
 
Cheers Ts Tom
The modification worked a dream for the standard and Formatting toolbars
but trying to hide either the "Worksheet Menu Bar", "Workbook tabs" or "Formula Bar"
resulted in;

Run-time error '2147467259 (80004005)':
Method 'visible' of object 'CommandBar' failed

Maybe I should detail my overall objectives as you might feel theres a better way of achieving them.

I have a simple single sheet workbook that I want users to simply enter data into but want to prevent them from making any changes to its layout format etc etc. and of course, without the hide "Worksheet Menu Bar" working they would simply right click and re-open it.

My one concern is that if indeed the hide "Worksheet Menu Bar", "Workbook tabs" had worked how could I then access the VB code to re-instate the toolbars, and make changes before re-hiding them for end user use.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi
Maybe replace the Visible with
Enabled instead.
Can be used in combination as well.
I think, in this case, Enabled = False
will make 'em invisible anyway...

Private Sub Workbook_Activate()
Application.CommandBars("Standard").Enabled = False
End Sub

Private Sub Workbook_Deactivate()
Application.CommandBars("Standard").Enabled = True
End Sub


The ALT-F11 combination will bring
up your VBA editor without the need
for a bar.

I usually only hide the bars for viewing
space. Protection seems to work well
enough without hiding things.
But you know what you are doing and I
do not.
 
Upvote 0
Hi Tom
That worked great for the "Worksheet Menu Bar" but didn't work for the "Formula Bar" it does however solve my problem in this case.

I would like to have used protection to solve my needs but I am using Data-form to have the data entered and this seems to block creating new entries, unless you know a way round it.
This message was edited by Peter100 on 2002-04-24 05:44
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top