View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default hide the menubars and toolbars


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)



"Pietro" wrote in message
...
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

"Bob Phillips" wrote:

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)



"Pietro" wrote in message
...
"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

"Bob Phillips" wrote:

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)



"Pietro" wrote in message
...
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

"Bob Phillips" wrote:

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)



"Pietro" wrote in message
...
Ok,now it's working fine,but how can i make it appear again
Thanx


"Bob Phillips" wrote:

I did, in your previous post.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail
in
my
addy)



"Pietro" wrote in message
...
Hi all,

Could any body tell me hw to hide the menubars and toolbars
once
i
run
my
excel sheet ??