Allow Items To Be Added To "cell" Shortcut Menu
I am using the following code to add an item to the right click " cell" shortcut menu.
I placed it in a Worksheet_Activate module in ThisWorkbook. I'm pretty sure the code is correct but it seems something is preventing the code from executing properly because no item is added to the menu. Is there some setting in a workbook that might prevent changes to the right click menu from being made? How can I get this code to execute properly?
'Set NewItem = CommandBars("Cell").Controls.Add
'With NewItem
' .Caption = "MACRO1"
' .OnAction = "MACRO1"
' .BeginGroup = True
'End With
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Counting Menu Items In Menu Bar
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 Replies!
View Related
Why Delete Menu Items Before Closing?
Came across an example in a VBA book, wrt adding custom menu items. This example included code for deleting the menu item before closing the workbook. Is there a reason you'd want to do this? The example already had provisions to delete the menu item if it already existed before the code ran, so you wouldn;t end up with multiple items...
View Replies!
View Related
Dynamically Adding Menu Items
I have created a menu called "Temp" and a sub menu called "Temp1". When the user click on Temp1, I need to dynamically add some menu items under Temp1. Is this possible in Excel? I need to do this on the right click menu. for example, along with "Cut", paste" etc menu's I need to add a Menu Item, Temp and under this menu, I need to add a SubMenu, Temp1. When the user click on the Temp1, I need to populate the child items.
View Replies!
View Related
Menu Items In UserForm For GUI
i'm trying to build a GUI-only application using Excel Userforms, with File and Help menus on the form. i'm coming from Java where i know getting a menu on a GUI is possible, but i haven't seen any resources for it in VBA Excel Userforms. is it possible to place menu items in a userform?
View Replies!
View Related
Multiple Menu Items Under One Heading 2003
I've got several add-ins that I'd like the end user to install and have accessible under one menu item ("Assessments") in Excel 2003. So far, the code below successfully adds the item, but it only shows the item of one add-in. How can I get it to show all the items under the "Assessments" category? Private Sub Workbook_Activate() Run "AddMenus" End Sub Private Sub Workbook_Deactivate() Run "DeleteMenu" End Sub Sub AddMenus() Dim cMenu1 As CommandBarControl Dim cbMainMenuBar As CommandBar Dim iHelpMenu As Integer Dim cbcCutomMenu As CommandBarControl
View Replies!
View Related
Create Custom Menu Items For Add-in
I have created an Addin from one I found on this site which creates a menu on the CommandBar. On this menu I can add my Macros. The Menu is initially supposed to perform a delete function then an add, just in case the menu already exists on the CommandBar. It is also supposed to Uninstall the menu when you de-select the Addin. At the moment it doesn't seem to be doing either, as I have now got 5 CommandBar menu's all the same and I can't delete them? This also creates a problem of when I add another macro, the menu on the CommandBar doesn't update with the addition? I have attached the .xla file for you to look at and see where I'm going wrong. VBA Macros & Creating An Add-in For Them
View Replies!
View Related
Menu Items Disabled While In Formula Bar
How do I disable a custom menu item when a user is entering data in a cell? For example... when the formula bar in Excel has focus, and a user tries to select Data > Sort, the Sort item is disabled. But when the focus is back to the worksheet, Data > Sort is enabled. I need to do the same thing for my custom menu items.
View Replies!
View Related
Items Greyed Out On Sheet Right Click Menu
I cannot figure out why this setting has changed. When I right click my tab worksheet in Excel to copy or rename, it does not allow me. I will need your advice to re-activate that options so it is visible and not gray. I tried in the VBA workbook properties settings with no luck and also Tools, Options.
View Replies!
View Related
Disable Save & SaveAs Menu Items
Is there a code or a way to make it impossible to make permanent changes to a file without first saving it as something else? I have a master report that is done monthly. I do not want anyone to be able to save any changes on the master report. How do I go about disabling save and the save as funtions in excel? I have a save as command button that I only want people to use. Also is there a way to set up a print command button to print to any computers default printer? I have set up a print command button on my computer and it works fine on mine, but I have sent the file to another person and the button is not doing anything on their computer. I assume because we don't have the same computers.
View Replies!
View Related
Sample Code To Add/delete Custom Menu Items
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.
View Replies!
View Related
Format Cell Value Added To Text
Cell b6 has been formatted to a percentage with 2 decimal places. Using the formula: ="todays percentage is "&B6&", thank you.". The value returned is: todays percentage is 0.78125 thank you. My question is can the returned value from cell b6 be formatted to a percentage or at least be formatted to 2 decimal places? I hope i posted this correctly i am a first timer.
View Replies!
View Related
Color Cell When Data Added
I m adding colors in excel sheet where ever ther is value added in the cell and delete the same value of the cell as this sheet i have to change every month end. i have tried this but not working when i want to delete the same Pivot Tables
View Replies!
View Related
Show Month Of Date Added In Cell
In one cell the user has to fill in a date, example 20.3.2008 and then in another cell he/she has to choose a month from a list (january-december). I need a macro that checks that the month stated in the date cell is the same as the month selected in the other list cell.
View Replies!
View Related
Use TextBox Number In Cell Formula Added By Code
I'm having trouble getting my random number generator functions to use my variables that are defined by text box inputs. I can mouse over the variables in the code and they have the correct values, with the excpetion of where they are listed in the functions. I'm sure I'm missing something simple, thanks in advance for any help! Private Sub cmdPopulate_Click() StdDev = txtStdDev.Value RandomNum = txtRandomNum.Value Mean = txtMean.Value lambda = txtLambda.Value OriginCell = txtOriginCell.Value If cmbDistributions.Value = "Normal" Then .................
View Replies!
View Related
Menu Pathing (execute The Macro From Menu)
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 Replies!
View Related
Sub-Menu Not Showing On Toolbar Menu
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 Replies!
View Related
Chart Menu Bar Won't Change To Data Menu Bar
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 Replies!
View Related
Replacing The Cell Right Click Menu
Right click menus are a well known topic but I am struggling to find information on what I want to do with them. I have seen it done so I know its possible. What I want to do is completely replace the right click menu with my own custom one on a worksheet. I do NOT want to add things to the existing right click menu I want to effectivly disable the existing one and put on my very own one in its place. I have looked at the code for adding a menu to a textbox etc which seems sound but I can't trigger it with an event. I don't have any code to show Im afraid as I am just playing with other people at the moment trying to get it to work.
View Replies!
View Related
Rightclick Cell Menu Deleted
I was customizing my rightclick cell menu, for cells in certain columns, to add some links to files and then I would delete them when right clicked in some other column. By mistake I deleted EVERYTHING from my rightclick menu. If found where the problem was so it wouldn't happen again. So now I am trying to put back those basic commands in the rightclick menu , but I cannot get those 'icons' that shows up on left of each command. how to get that?
View Replies!
View Related
Menu Bar/Navigation :: Tool That Creates A Menu Bar Or 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.
View Replies!
View Related
Show A Certain Cell Depending On Data From A Drop Down Menu.
I have created a color coded calendar on a spreadsheet for work that shows when a book will be published depending on when it comes into our warehouse, this is on sheet one. I would like on sheet two to have some kind of filter or statement that would eliminate the need to look at the calendar, I.E. the user would just have to type in the date or select the date from a list and excel would show you what day the book would publish on using the data from sheet one. I can imagine that this is hard to picture so i have attached the file as well.
View Replies!
View Related
Selections In A Dropdown Menu To Generate Different Cell Values?
Hey everyone, I'm new to the boards and only moderately familiar with Excel, so I'm looking for a little help. My question might not be completely clear, so I'll try to give you a visualization. I want to give users the ability to choose different kinds of expenses from a drop down menu (i.e., Salary, Postage, Supplies). However, some of the expenses have general costs associated with them on top of other costs, and I want it to be made clear by having the proper costs come up with the proper expense. For example: ...
View Replies!
View Related
Auto Fill Cell Value Added By "Copy N Paste"
I've got this macro, that will auto fill in the "username" (Col. J),and the date (Col. K), When a value is "typed" into the column I for the same row. If I "Copy N Paste" the same value down column I for any given number of rows, the data will not autofill in to (Col.J&K). This only happens when a value is typed. Is there a way to fix this so it will auto fill when, a value is "Copied and Pasted"? Also, how would I set the range for this to happen for row 9 and down. I don't want the auto fill happening in rows 1-8. I've attached an example layout. Here's the code I'm working with:
View Replies!
View Related
Sum 1 Or More Items In A Cell
I have a monthly calendar on each sheet for employees, attached is a copy of one of the sheets. I can have up to 2 combinations of text in a cell, i.e., 'V' or 'T' in this example, followed by a number, that can range from 1-12, i.e., V12T4. What I am trying to do is add up the total 'T' and 'V' time for the month for each employee. Hopefully between what I have written and my attached sheet, will explain what I am trying to do. I know how to write the =Sum(If for using only 1 item in a cell, but not 2.
View Replies!
View Related
Selecting Multiple Items From A List In One Cell.
Is it possible to restrict the values of cells in a particular column to entries defined in a list BUT to allow each cell in that column to display multiple items from the list (seperated by a comma for example). I've attached an example of what I would like to do - In Sheet "2010 Data" I want to be able to select multiple values in column F....(the values are defined within the list named "Platforms" on the worksheet called "Lookups"
View Replies!
View Related
COLOR Items, Text & Cell(s), Unresponsive
I should much appreciate your help on this strange new problem which is twofold: 1. Clicking either color item (for text or for cell) brings no change in designated cell(s) 2. When colors appear on Print Preview they do not on the Printout. It occurs on Dell Vista Ultimate SP2. Am on IE8; Ctrl Panel list also shows !E7. It does not occur on HP XP SP3 desktop although no discernable differences in spreadsheet. On laptop I am unable to use either COLOR icons -- for text or for cells. No trouble heretofore which makes it so frustrating. Ordinarily, following usual usage, all is well. For unknown reasons, now neither has any effect. Explored for cause/cure without finding anything more than instructions already well known. Did see note saying High Contrast might make colors ineffective, so searched out that. Found how to turn on/off, and easily turned off High Contrast. Made no difference.
View Replies!
View Related
Validate A Cell To Only Allow Items In List1 Or List2 Or A Numeric Value
I have 2 lists and I want to validate a cell to only allow items in List1 or list2 or A numeric value. List1 D1 D2 D3 .. D10 .. Dxx List2 Hol Off Sick These lists may changein length and number of items the second part, is can you valudate based on other values in a column, basically I have a list of names of available operatives, and I want to make sure each name can only be entered once in a column! Would be even better if I could get a dropdown which showed the remaining choices!
View Replies!
View Related
How To Use One Cell To Match Pairs Of Cells For Missing Items
We use a program at work to check items out to individual people but sometimes an item is missed and it takes forever to manually look for who it is. In the attached example, (keep in mind there might be more than 100 people on this list...this is just two people), the first 2 items are a pair (radio and radio case) and the second 2 items are a pair (laptop and laptop case). Id like a way (condition formatting) to flag a person who has one item from the pair checked out and not the other. (Ive manually highlighted one person who only has one of the paired items...id like this to happen automatically) EDIT:: If the first person were missing the radio in this example, his name would be highlighted on the line with the matching pair...cell D1 (radio case) Other information: Radios will always be RFAMRC*** Radio cases will always be RFAMF**** Laptops will always be RFAMTD*** Laptop cases will always be RFAMTE***
View Replies!
View Related
Find Array Uniqe Items And Transpose 1 Each Into Cell
I have a col of dates that change, 9/15, 10/15, 11/05 and reside in col. I I then have a corresonding cell in row I136, M136, Q136, U136, Y136 and AC136. I want to find the starting at the earliest date starting in I36 , M136, Q136... So I136 would be updated to 9/15, M136 = 10/15, Q136 = 11/05, ... I am thinking a CSE type formula would be a possibility, but need assistance in this or in a piece of code..
View Replies!
View Related
Using Ctrl+M As Shortcut
i have tried using the letter M as a shortcut key (because it is to activate a "Move" function) but unfortunately it doesn't work. I gather from this that not all of the keys are available as shortcut keys presumably because they already have function. Is there a way around this? and/or is there a list somewhere of the available shortcut keys?
View Replies!
View Related
Search Shortcut
i need to create a shortcut (ideally ctrl-z) that will allow me to search column D which has a tonne of street names in it. i need to do a "custom" search and enter "contains" and then have the field on the right be left empty for me to enter what i need to enter. I want to hit ctrl-z (or a b c d e f g h etc...) and have that blank field brought up for my to enter something to search for and have all those criteria met "custom-contain-?whatitype?" I've tried using the record new macro function but it won't let me leave the dialogue box open for me to enter my street name. i hope i explained that well enough.... basically i want to hit ctrl-z and have that custom-contains for column d open and ready for me to search. autofilter is on. and i am referring to the drop down menu that lists "top 10" "all" and "custom" i want to chose custom and then chose "contains" from the first drop down menu in the dialog box that pops up.
View Replies!
View Related
Shortcut To Copy As Image
I'm copying a lot of tables and charts etc in Excel to paste into PowerPoint. And I'm using the mouse to go into Past > As image > Copy as image I then get asked a question that I need to hit the enter button to answer. I'd like to make a shortcut for this. Is this possible in VBA? ------- Using Excel 2007 & Vista if that matters
View Replies!
View Related
Font Color Shortcut
I am just looking for a keyboard shortcut macro. I change the font color in rows one at a time to either blue or red by selecting that row and using the format toolbar to select the color I want. Is there a macro shortcut for changing font color? Even further, can the macro be able to change the font color of the entire row without highlighting the entire row? Meaning if I only have 1 cell selected within the row I want to color the font and apply the shortcut, can it color the font in the entire row???
View Replies!
View Related
Shortcut - Select All Worksheets
I was checknig here for shortcuts... http://office.microsoft.com/en-us/ex...116591033.aspx I wanted to find a shortcut to select all sheets in a workbook. There are about 30 worksheets in my workbook, and selecting all is a pain. in Excel 2003
View Replies!
View Related
|