Vba Code To Remove The Tools Menu
Sep 2, 2009Is there code available that will hide the Tools Menu within excel?
View 5 RepliesIs there code available that will hide the Tools Menu within excel?
View 5 RepliesI have installed Excel 2007 but cannot find the tools menu [or tab]? I see tabs like 'Home', 'Insert', 'Formulas', 'Data', etc. but no tools?
View 2 Replies View Relatedhow to change the name of a Command Button that I have called "Command Button" on the Tools menu.
Also if I have this button created in my Personal workbook and I send the file to another user what should I do? Will that user be able to see this button ok?
VBA code to extract excel report from tools e.g. SAP or other tools.
View 3 Replies View RelatedI am setting up VBA code to create different excel workbooks. One of the differences is in the VBA Tools References that must be enabled to make the whole thing function.
How do I write VBA code to turn on and off specific tool references ie. if i had a reference called OrbitCOM Library how can I turn it on and off using VBA code.
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.
I want to add a control under Chart on the menu bar. This line of code errors with "Invalid Procedure Call or Argument"
With Application. CommandBars("Worksheet menu bar").Controls("Chart")
Change "Chart" to "File" or "Edit" or "Tools" and it's fine.
The Chart item only appears when a chart is selected, but it errors even when a chart on the worksheet is selected.
A spreadsheet that needs a new menu item in a custom menu does not show the custom menu code. Tools-->Customize-->Commands-->Rearrange Commands shows the menu and allows me to add a new menu item and macro.
After saving and exiting excel and going back into the spreadsheet, the new menu item is gone. How can I find the code to do this to keep the menu item? In the VBE, I looked in the object browser(F2) in all of the libraries and could not find the code. In the workbook_open and workbook_activate I can disable it with CommandBars("Worksheet Menu Bar").Controls("menu").Delete and it disappears.
Option Explicit
Dim cMenu1 As CommandBarControl
Dim cbMainMenuBar As CommandBar
Dim iHelpMenu As Integer
Dim cbcCustomMenu As CommandBarControl
'(2)
Set cbMainMenuBar = Application.CommandBars("Worksheet Menu Bar")
'(4)
Set cbcCustomMenu = cbMainMenuBar.Controls.Add(Type:=msoControlPopup)
'(5) Give the control a caption................
I have created several spreadsheet with customized menus. In step 5 when I type
a period the options for selecting Caption does not appear. In step 6 the 'Control' word didn't appear in list. Sometimes the options in step 6 do appear BUT not the option for Controls. I have created spreadsheets with menus that work but the only way I could do it was to cut and paste from the website and then modify it.
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] ......
I'm "missing something" here. I used the EOMONTH function in a recently developed workbook. In order to activate that function, I had to go to the Tools menu, select the Add Ins option and add the Analysis Toolpak to my Excel configuration ... no problem, worked like a charm. Then I sent the workbook to another user. Of course, the EOMONTH function came up with errors when she opened it. I talked her through the Tools/AddIns/Analysis Tookpak configuration change ... but could not get the EOMONTH formula to work.
View 5 Replies View RelatedJust discovered the drawing tools on my quick access tool bar are disabled. All were enabled and working fine just yesterday. I'm running 07 on xp. I've shut down and rebooted, no change. Need to know how this could have happened but mostly, how to enable.
I use several different workbooks during the day, and sometimes I would prefer the " move selection after enter direction" option to = "Right" and sometimes "Down". It doesn't seem to be an option that is saved with the workbook.
what could be done to a workbooks code to change this option upon opening the book?
I placed an add-in (.xla file) with a " function" and a "sub" into C:Microsoft Office XPOffice10Library. When I go to Tools-->Add-Ins the Add-In doesn't show up. When I browse the file it says it already exists and still doesn't show up. The strange thing is that the "function" does work, but the sub (which is a sub worksheet_change) doesn't run. I also tried doing the steps as they are laid out in http://www.ozgrid.com/VBA/excel-add-in-create.htm and ended up with the same problem. The function works when I open up a brand new Excel application and use Book1, so I know the function isn't embedded in the sheet.
View 4 Replies View RelatedI 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 RelatedI'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
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
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 Relatedmy 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.
Why when I open some files that have macros and I enable macros on initial opening and then go to tools-macro-macros it's not showing anything there, but when I press Alt F11 then I can see macros?
Is there any way to change this that I can see all macros from tools-macro-macros?
I've created and excel spreadsheet that has code like this in a Module named Print w/ in the workbook:
Sub Print_wsPrint()
Sheets("Print").PrintOut
End Sub
I have saved it as an MS Office Excel add-in.
I added the add-in to my excel environment via Tools, Add ins...and let it copy it to my C:Documents and SettingsjohnApplication DataMicrosoftAddIns directory.
But yet when I create a menu button and assign the Print_wsPrint to a custom menu, it complains and says "The macro Model.xls!Print_wsPrint cannot be found," where Model.xls is the workbook I am in. It's in my add-in, not in the current wb.
When I choose tools -----> options from the menu bar nothing happen I can not changes my options. I am using excel 2000, I must of changes something but I don't not remember what. Can someone help turn back this option
View 9 Replies View RelatedI have a spreadsheet with two modules. In an effort to reduce the file size of an archive, I’d like to remove some of the code (i.e., Module1). I have a macro that attempts to do this.
There are three parts to the operation. The first removes Module1; the second Quits the application; the third saves the changes. If I run each of these operations separately, it works fine. However, I’d like to do this with only one macro (SKK4). For some reason, it does not remove the Module.
Here is my test
Sub skk1()
ThisWorkbook.VBProject.VBComponents.Remove_
ThisWorkbook.VBProject.VBComponents("Module1")
End Sub
Sub skk2()
Application.Quit
End Sub
Sub skk3()
ThisWorkbook.Close SaveChanges:=True
End Sub
Sub skk4()
skk1
skk2
skk3
End Sub
Private Sub Dupe_Remover()
'29/06/2005 by nhunter
Application. ScreenUpdating = False
Dim R1 As Range
Dim drow As Integer
Dim lastitem As String
Set R1 = ActiveCell
loopst:
If Trim(ActiveCell) = "" Then
Goto procend
End If............
I have a VBA sub "Create Invoice". After I run it, I would like to remove it, using a CleanUp sub.
Is it a good assumption that a VBA routine is simply an object like any other object?
If so, what is the VBA code to remove a sub?
Does it matter whether the sub is a free standing module, or a sub that is attached to a worksheet?
I have developed a series of spreadhseets in which I use a macro to derive and insert the data from a SQL Server db. These spreadsheets may have one or more worksheets, some of which start as blank "canvases", others are preformatted with static data.
They are used for client reporting so are heavily formatted and include graphs; some manual preformatting, some coded, some graphs drawn completely by the code, some already in place - I just populate the data source. The VBA for the most complex one extends to around 5-6000 lines of code.
While this code does not add a huge amount to the footprint of the files, I feel that it is inappropriate for the spreadsheets to be distributed to the end clients with all this code included. The code is password "protected" but we all know how effective that can be although that is not really the point anyway - I simply feel it would be more professional if the code were not there at all.
There doesn't seem to be any options on a "Save As" method which enable the resulting sheets to be saved without the macros. I have tried recording a macro in which all I did was to delete the macros concerned - nothing was recorded. So a macro to remove macros seems to be out of the question.
These spreadsheets are held in a master folder on a server and are set as "read only". The users start the a sheet, run the macro (via a menu item which displays a selection form) and then save the resulting spreadsheet as another file in another location. I am wondering if there is some way I can cut into this process and develop my own "save" routine.
I am using the following code to select rows in a filter.
Selection.AutoFilter Field:=Worksheets(" Dashboard"). Range("G1"), Criteria1:=Worksheets("Dashboard").Range("H1")
This code runs when I click a command button on a userform.
When I load the userform up again I want to clear off the previous filter before I filter again as there are 4 columns which have filters on.
I have tried using ActiveSheet.ShowAllData before filtering again but this code falls over if there isn't a filter already on.
I want to hide and unhide tool / macros menu so that users don't run the macros in the workbooks.
On one of my computers, Excel is freezing up just about any time I select something from the Tools or Format Menus (same goes if I use keyboard shortcuts to call any of those things). I have to kill it with the task manager. It is not a specific workbook, I've tried several, including new blank workbooks.
It's not all menus, as File options seem to work. I also am able to Autosize columns by double clicking, but basically any other formatting things (i.e. CTRL + 1) do not work. I also tried to show the Cell Format dialog via VBA, (note: I am able to get to VBA editor, etc...), and it locked it up then too.
Finally, I tried "Detect & Repair" from the Office disk, but that didn't do anything. Next, if necessary, I'll do a full re-install unless anybody else has heard of this and knows what the problem is.
I have a set of text in rows which includes duplicates like this:
Column A
Text 1
Text2
Text1
Text500
Text500
I then need to remove the duplicates and put them in column B. I normally use the remove duplicates button in Excel to do this but seeing as I have to do this task every day, I was hoping there would be either a formula or VBA solution which automatically does this?