Hide Standard Menu Bars
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
ADVERTISEMENT
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
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
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
Mar 10, 2009
1: Is their anyway I can get rid of the File, Edit, View, etc buttons at the top of the document so everyone that opens it can not see them? and also the save button, the idea is they have to use the button to save the sheet.
2: I have a button on the sheet with a macro that saves the sheet once it has been worked on, the sheet flashes when this button is clicked is there any way I can stop the sheet flashing ?
View 2 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
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
May 20, 2006
Suppose I delete a (unknown) number of items from the Worksheet Menu Bar. This can vary because of the fact that my excel sheet is being used by a different number of people, all with a different Worksheet Menu Bar configuration. Is there a way of counting how many Menu items are still left in the Worksheet Menu Bar?
So, suppose all that is left (after using the program) in the Worksheet Menu Bar are Excel, File, Tools, Help. How can the porgram find out that there are only 4 items in the menu?
View 3 Replies
View Related
Jul 8, 2007
I am taking an EXCEL(online) class and in my current assignment i am to create a 'list' for sorting and querying. However i cannot find the 'list' option, under my DATA option on the toolbar. I have tried all my toolbars and shortcuts but I am unable to find it anywhere.
View 9 Replies
View Related
Jan 20, 2014
I have a bar chart which compares two columns of data. the data in one column is fixed to 100. the data in the other column varies. a third column states whether each entry is "A" or "M". Is there a way to include the A or M on the bar chart? Perhaps by having a set colour whether the data is A or M?
View 1 Replies
View Related
Jul 3, 2009
What I need to do is add a scroll bar to my text box in my form. I used the properties of the text box to add a scroll bar but when you preview it you can't see it. When you click somewhere inside the form it appears and is workable but not when it hasn't been clicked on. How do I make the scroll bar appear from the start. this is a vertical one ad is on a text box within the form
View 11 Replies
View Related
Mar 13, 2012
FYI This is cross posted on the VB Forums at [URL].....
I know that you can use the below code to add buttons to 2 of Excel's menu systems,
Code:
Application.CommandBars("Worksheet Menu Bar").Controls.Add
Application.CommandBars("Cell").Controls.Add
And this should add a command bar control of whatever type specified to either the Add-Ins tab of the ribbon or the right-click menu when clicking on a range of cells.
However, I would like to be able to add some command bar controls to the right-click menu when you click on a group of columns. Is this possible?
View 1 Replies
View Related
Sep 24, 2012
The graph function in Excel is driving me insane! Is it possible to do as image below shows? If so, how?
As you can see, I dont want to stack the result, but rather compare two bars with the bigger one in the background.
View 3 Replies
View Related
Sep 27, 2007
code to remove the titlebar of a userform in Excel/VBA.
Remove meaning the program user must not beable 2 see the titlebars..
View 9 Replies
View Related
Jun 21, 2007
I have made an excel addin named "INDNUMFOR" and want that this should display under "Data" of main menu bar. thus, a new item (sub menu) should appear naed "IndNumFor" under Data main menu.
View 9 Replies
View Related