Hide Menu Bars In Only 1 Workbook
Jun 13, 2008
I have a workbook that I created as an interface for my workplace. I disabled the File, Menu, Edit, etc...menu bars through .Control("x").Visible = False and .Enable = False as well
Now when I open a new workbook all the menus are there still which is good but when I open a previously saved workbook all the menus are missing. Is there a way where I can have ONLY my workbook have the menus gone and for them to appear in other workbooks that were saved?
View 3 Replies
ADVERTISEMENT
Jun 13, 2007
This is the code I use to temporarily remove menu barsfor a spreadsheet that is managed by user forms. I have code at the close of the program to replace the menu bars. The code work well although and it places a list of enabled bars in the range C1:C50 on the sheet "Bars". The range C1:C50 is not locked before the sub routine 'Hide Menus' runs. However after the sub routine 'Hide Menus' runs, the range C1:C50 is always locked and I don't understand why this is so, I would prefer it not to be.
Sub HideMenus()
Application. ScreenUpdating = False
i = 0
Worksheets("bars").Range("c1:c50").Clear
On Error Resume Next
For Each Allbars In Application. CommandBars
If Allbars.Visible = True Then
i = i + 1
With Worksheets("bars")
.Cells(i, 3) = Allbars.Name
If Allbars.Name = "Worksheet Menu Bar" Then
Allbars.Enabled = False
Else
Allbars.Visible = False
End If
End With
End If
Next
Application.DisplayFormulaBar = False
On Error Goto 0
Application.ScreenUpdating = True
Opening.Show
End Sub
View 3 Replies
View Related
Mar 2, 2008
I have some code that creates multiple new menu bars for a user which each have there own controls. I need to know which control is selected by the user for onaction. The example below is where there are up to 20 new menu bars with names Tract 1, Tract 2, etc. For each Tract, there is a controlbutton titled Absoprtion and I need to know which "Absoprtion" button was selected to run the "ViewAbsorption". I need to use th For next function because the number of menu bars could vary.
Dim objMenu As Object
Dim objViewMenu As Object
For y = x To 39
Name = "Tract" & y - 19
With Application.CommandBars("Worksheet Menu Bar").Controls
Set objMenu = .Add(Type:=msoControlPopup, temporary:=True)
objMenu.Caption = "&" & Name
End With
With Application.CommandBars("Worksheet Menu Bar").Controls(Name).Controls
Set objMenu = .Add(Type:=msoControlButton, temporary:=True)
objMenu.Caption = "&Absorption Schedule"
objMenu.OnAction = "ViewAbsorption"
Next Y
View 9 Replies
View Related
Nov 18, 2011
I was working on an Excel 2003 workbook with 3 worksheets. The first sheet is the 'Menu' sheet on which I placed buttons to take me to the other two sheets and back. I wanted to hide the Excel menus, toolbars, scrollbars, etc. on the 'Menu' sheet so that no user can alter that 'Menu' sheet. The 'hiding' code was not meant to affect the other two sheets.
The code worked fine. However, when I closed the workbook and tried to open a NEW workbook so that I could do some other work, I realised that the new workbook and its accompanying sheets had the menus, toolbars, scroll bars, etc. hidden. I closed the workbook and tried opening a new workbook. It was the same experience.
I called up the file with the code, deleted all the codes attached to that file, and re-saved the file. It did not solve the problem. And when I tried many more new workbooks and got the same problem, I deleted my entire Office 2003 installation and re-installed Office 2003. It still did not solve the problem.
View 9 Replies
View Related
May 4, 2007
I have opened an Excel file (map1.xls) and changed some little things in that file.
after that I open a new Excel file with some VBA code in it.
In ThisWorkbook I have this ...
View 9 Replies
View Related
Mar 9, 2012
I use this code to hide the tool bars in a workbook, the code works but when I go to a new sheet the row and column headings are visible. I tried several things that didn't work.
Code:
Private Sub Workbook_Open()
Application.ScreenUpdating = False
On Error Resume Next
With Application
.DisplayFullScreen = True
[Code] ..........
View 1 Replies
View Related
Jan 1, 2012
In excel 2007, when I do workbook_Activate I want to hide all of the command bars. in 2003 vesion I used
.CommandBars("Worksheet Menu Bar").Enabled = False
But it is not working for me on 2007.
View 4 Replies
View Related
Nov 30, 2006
I have a form that is dynamically created at runtime. I have assigned the controls to a frame in VBA and also attached a horizontal scrollbar manually to that frame.
How can I control the scrollbar in VBA to appear, when columns of controls added to the frame exceeds 10. If not I want the scrollbar to be invisible?
Private Sub UserForm_Initialize()
Const cTextBoxHeight As Long = 16
Const cTextBoxWidth As Long = 40
Const cGap As Long = 10
Dim W As Integer
Dim a As Integer
View 9 Replies
View Related
Aug 26, 2009
I have an Excel 2003 program that contains macros. One of the macros hides certain command bars and disables the worksheet menu bar. On close the opposite is true. The problem is, if a user uses the disable macros when opening then the worksheet menu bar and other command bars are still available. I would like to hide all of the data sheets and display another sheet that would normally be hidden displaying a message that the macros have to be enabled for the program to work correctly if disable macros is chosen. When the enable macros are used I would like the Error page to be hidden.
View 6 Replies
View Related
Jul 6, 2009
In the code below using msoBarTop places the menubar at the top but it seems to just place it in a new row at the right of all menus.
How or can I dock the menubar next to the last menubar?
View 7 Replies
View Related
Feb 13, 2007
I am creating a spreadsheet that I only want to have a customised toolbar (to stop the client changing things) as a result I would like to hide the standard worksheet menu bar on opening the spreadsheet. Can anyone please provide a bit of code as tried macro recorder but if you uncheck the toolbar in the toolbar options drop down it re appears on closing the toolbar options box.
View 9 Replies
View Related
Feb 27, 2007
Is there a way to either hide or disable the worksheet menu bar on ONE SHEET ONLY, so that a right-click customize doesn't even work on that sheet. I want the user to be able to do nothing but what my customized toolbar allows on that sheet.
View 5 Replies
View Related
Mar 6, 2009
I am trying to derive the EMI for a Loan Amount and also chart a PIE graph for the same..
Instead of Manually feeding the values such as :
Variable 1 : Loan Amount : Min : Rs 50,000/- Max :Rs 5000000/-
Each Spin (1 Unit) -Rs 25000/-
Variable 2 : Interest Rate : Min : 5% Max : 30%
Each Spin (1 Unit) -0.25%
Variable 3 : Tenure/Duration : Min : 6 months Max : 30 years
Each Spin (1 Unit) - 6 months
I want to have a Scroll-Bar where the values can change Automatically but am not aware of using the same...
Can someone please help me with a small attachment with the above variables attached to it..The values drawn should be displayed as well above the Scroll-Bar and maybe can make the Min and Max more dynamic by storing it somewhere in the Sheet..
I am looking for Non-VBA solution to do the same..
View 12 Replies
View Related
Jan 13, 2007
In the menu via TOOLS-->OPTIONS-->VIEW I am trying to remove the scroll bars from just one worksheet but when unticked, this option affects all of the worksheets in my workbook. Is there a way to just nail this selection down to one sheet via properties?
View 2 Replies
View Related
Dec 13, 2012
I have an excel workbook with multiple worksheets(tabbed across the bottom of the workbook). How can I set up a menu of the worksheets on the left hand side of the workbook that enables me to jump to that worksheet?
View 4 Replies
View Related
May 12, 2006
I'm trying to load a custom menu in a workbook to avoid having users to load an add in to use the spreadsheet. I'm trying to add this to the "this workbook" tab but I've never done this.
View 3 Replies
View Related
Nov 30, 2007
I have downloaded a custom menu workbook attached. I am wanting to only show the custom menu in one workbook as it appears in all workbooks open at the time.
View 3 Replies
View Related
Feb 28, 2008
i want to create a menu in the worksheet named "Main Menu" that lists all the other worksheets within the workbook with the option to select the required worksheet and view or print it.
View 7 Replies
View Related
Jan 20, 2008
The following code for a custom menu is used in a workbook which has two sheets with
embedded charts, two chart sheets and several sheets for calculations
and information
In This Workbook
Private Sub Workbook_Activate() 'Changed Activate to Open
Run "AddMenus"
End Sub
and
Private Sub Workbook_Deactivate() 'Changed Deactivate to Close
Run "DeleteMenu"
End Sub
and
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Run "DeleteMenu"
End Sub
View 9 Replies
View Related
Oct 5, 2012
I am working on building a custom menu and I am looking for the code that would open a specific workbook execute a macro when I select the tab, can this be done????
View 1 Replies
View Related
Jun 24, 2014
I have created a sub to add new controls to the "Cell" shortcut menu. Can I remove the standard "Cell" shortcut menu controls? if so how do you do it?
[Code] ......
View 4 Replies
View Related
Oct 20, 2009
I have a workbook with multiple sheets. Is there a tool that creates a menu bar or code that I can add that would support navigation?
My goal is to have something with approximately 4 options (buttons?). They would link to 4 different sheets that serve as indexes within the workbook.
I know I can add a control like a button to a given sheet that would take the user to given sheet when clicked, but can I make the button 'float' above all the sheets, or add to a menu bar, or something? I just don't want to have to add the button to every sheet in the workbook.
I am looking for something simple/easy, and am not looking for anybody to do the work. I just have no idea on how to approach the problem.
View 11 Replies
View Related
Oct 18, 2008
I have a column with various drop down menu boxes and I need to add another selection to the menu list. My problem is, it's been so long since I did the drop downs, I have forgotten how to do it..
View 3 Replies
View Related
Jul 2, 2009
I'm adding a menu selection to the right-click menu that you get for cells. I can add and remove the menu option but, when I try to execute the macro tied to the menu, I get "the macro...cannot be found". I can't figure out what appears to be a "pathing problem". I'm sure it's simple but...
Here's the
View 4 Replies
View Related
Mar 27, 2009
I have actually got the Window menu in the Main Menu Bar of excel deleted using below command.
Application.CommandBars("Worksheet Menu Bar").Controls("Window").Delete
View 9 Replies
View Related
Jul 15, 2006
Now this is something which I dont even know if it can be done, but its something which I would use, a lot. When clicking on a button, like a normal button from the control toolbox, is it possible to open a menu from this? So I click on the button i made called "accounts" and this opens a menu next to it with different options.
View 5 Replies
View Related
Apr 26, 2007
my worksheet menu bar is displaying the ' Chart' menu no matter what I do. Not only do I have no charts in the workbook, (verified this by: )
For Each ws In Worksheets
ws.Select
MsgBox ActiveSheet.ChartObjects.Count
Next ws
but adding worksheets, selecting various parts of a worksheet, creating a chart and deleting it, and everything else I've tried has no effect.
One interesting thing - the first chart I added (to test if it would 'unstick' itself upon deletion of the new chart) was named 'Chart 2', implying there was a chart1 that existed previously.... although I am fairly certain I never added a chart to this workbook at any point.
Also, the menu bar is working fine in other workbooks, and changes to chart and back to data like normal.
View 6 Replies
View Related
Nov 7, 2007
I just attended the Excel Seminar and learned so much! I found out that Hiding a workbook will solve a huge issue I am having with a file popping up everytime I run a macro.
I"ve searched the blogs but can't find the answer. I found some information on how to hide sheets, but I can't find anything on how to hide an entire workbook
I went into the visual basic editor and can't find what I am looking for.
Does hiding all the sheets actually hide the entire workbook, or is there a way to hide the workbook?
View 9 Replies
View Related
Jan 30, 2009
We're trying to create an invoicing sheet with MS excel for our sub contractors but we also want the information they input to be transfered onto a second work sheet within the work book that has our mark up added.
Problem is that we don't want our sub contractors to see the sheet with the mark up. Is there any way to hide a work sheet or to limit access to the work sheets some one can veiw with in a workbook?
View 2 Replies
View Related
Sep 5, 2008
My goal is to be able to hide certain columns in the workbook based upon certain criteria. Moreover, I need to be able to hide columns in a certain tab even if I working in a different tab (i.e. if I am in Tab "A", I want to be able to hit "Ctrl + Alt + X" and be able to hide columns in Tab "B").
In order to accomplish this, I selected the Visual Basic icon. I then clicked on the "Insert" drop down menu and selected "Module". I have included a sample of the code that I wrote and inserted in to the module (see below). This general pattern of code repeats itself for 16 different macros - all in this same module.
Sub Macro01()
Worksheets("Input - Historical Financials").Columns("A:AD").Hidden = False
Worksheets("Input - Historical Financials").Columns("D:AD").Hidden = True
End Sub
Sub Macro02()
Worksheets("Input - Historical Financials").Columns("A:AD").Hidden = False
Worksheets("Input - Historical Financials").Columns("F:AD").Hidden = True
End Sub
View 9 Replies
View Related