hide the menubars and toolbars

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Could any body tell me hw to hide the menubars and toolbars once i run my
excel sheet ??
 
I did, in your previous post.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = True
Next oCB

Application.DisplayFormulaBar = mFormulaBar


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi "Bob Phillips",
Really i appreciate your help,but i have two problems:
1-The macro "autoexec" that hides the menus when i open my excel sheet
spmetimes works and sometimes no !!!
2-When i open any other excel sheet the menus are always hidden, i need to
hide these menus only from a certain sheet called "my team KPIs"

Regards
 
I have no idea what autoexec is or does so you will need to give more detail
here.

If you want those menus hidden only for that s/s, you need to put the hide
in the workbook activate procedure, and show them in the workbook deactivate
event procedure for the workbook in question.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
"autoexec" is the macro that works once the sheet is open,i guess,please
write the exact codes that i shouyld use as i'm not experienced enoujgh with
Excel..
Regards
 
Get rid of what you have, and use this in that specific workbook

Option Explicit

Private mFormulaBar

Private Sub Workbook_Deactivate()
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = True
Next oCB

Application.DisplayFormulaBar = mFormulaBar
End Sub

Private Sub Workbook_Activate()
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False
Next oCB

mFormulaBar = Application.DisplayFormulaBar
Application.DisplayFormulaBar = False
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Execellent job !!
Could you tell me please the code to use to have my document always open on
the tab "My team members",as i want users to go to the other tabs always
through "tab

tThanx
 
Private Sub Workbook_Open()
Worksheets("My team members").Activate
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi "Bob Phillips",
Thank you very much for your help,I have carried out all the below
steps accurately and the sheet is excellent,but i still have two problems:
1-On my home computer when i open any new sheet now,the menu bars and tool
bars are always hidden..,i cannot retrieve them any more unless i open this
sheet and run the macro that shows them again,is there any other solution to
make the command thaty hides the toolbars applicable only on one sheet?
2-On my work computer i can open any other excel sheet without facing the
above mentiond problem but when i run the macro that displays the menu bars
and tool bars, i get an error and excel takes me to the VB error,is there any
solution ?
Regards,waiting for your always professional answer.
 
Hi Bob
This code is along the lines of what I need but is there a way of modifying
it so that the FILE/MENU/EDIT/etc menu bar is still shown and one other
toolbar (one that I will create).
Thanks,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top