Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

toolbars 1

Status
Not open for further replies.

isma786

Technical User
Apr 7, 2004
31
US
Hi

I need to stop users being able to use the main toolbar (File Edit, etc)

thanks
 
Check this FAQ faq707-4841

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Hi isma786,

Most Office applications ..

Code:
[blue]Application.CommandBars("Menu Bar").Enabled = False[/blue]

Excel ..

Code:
[blue]Application.CommandBars("[red]Worksheet [/red]Menu Bar").Enabled = False[/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
I did
Application.CommandBars("Worksheet Menu Bar").Enabled = False

on workbook open

and put Application.CommandBars("Worksheet Menu Bar").Enabled = True
when the user clicks a button but it does not appear.

is there something i am not doing?
 
sorry when they press the ext button the spreadsheet closes without saving and I have the code:
Application.CommandBars("Worksheet Menu Bar").Enabled = True
but it does not appear do i need to make it visible?
 
Hi isma786,

Is this your own Exit button you have added to the Workbook, or the [tt]X[/tt] on the Excel Title Bar? And where do you have the code (which ought to work)?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
thanks for the reply tony.

I have a button placed on the sheet to exit the app. On click the code should execute, but the header does not appear i have the code on before close on the worksheet as well but neither executes.

any help would be appreciated.
 
Hi isma786,

If nothing executes, it is most likely in the wrong place ..

The Workbook Beforeclose event should be in the ThisWorkbook module.

Depending on what sort of button you have (Control Toolbox or Forms Toolbar), the code should either be in the owning Sheet's module or a separate code module. So the questions are: what type of button, where and what is the code?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top