I am trying to graduate out of the crayon age of menus on a worksheet, to using a User Form Menu. Problem is, I don't understand how they work. I've created a test program using a simple form with an option button, a combo button, and a command button. The goal is if the option button is true, it places the color selected in the combo button on the worksheet. Here is my code, what am I missing to make it work?
Anyhow, I enjoy the modern convenience of a dual-monitor setup but still find myself struggling with small forms(?) in Excel. For instance I am currently looking at the "Conditional Formatting Rules Manager" which occupies a very limited amount of screen real-estate. The sheet I am working on contains a large number of conditional formats which all use long custom formulas. I am not the original author.
I would love to be able to resize the overall size of the menu and the columns within it but, for the life of me, I can't seem to do so. It would be much easier to be able to see the rule formulas in one glance as opposed to having to go into each one to see the one-character difference. As stated before I certainly have the real-estate to do so.
So I have a work book with a number of user forms. One form I have completed has several navigation buttons (previous, save, next......) a couple of drop downs and a "tabbed" (pages) area with a text box on each. I think I finally have it looking (and working) the way I want. The issue is I need 12 more that are Identical (different text - but layout and code is the same) To make them look and work the same how can I copy the one I have correct? Is Export/Import the way to go? Does that bring all the code?
My problem is trivial but annoying. When I initiate my user form, one of the check boxes has a dashed border around the outside as if it was selected. No matter what I try, I cannot get the form to initialize without effecting this box. If I delete the box and recreate it, another box simply inherits this problem.
I have attached the spreadsheet, please Click the button over "A1" to see what I mean if you have the time.
I have a userform, when it first comes up, then there are some text boxes that needs to be filled. I have the "ok" button which opens another form. What would be the code for whatever was filled in the text box be pasted in a cell? In other words, once it is ok is clicked another form pops up and then whatever info was put in the text boxes is pasted in a report.
I have 2 User forms which take their initial values from the same worksheet. One moves stock to another location, the other removes stock when it has been used.
When I use one of the forms on a different row, or switch to the other form it retains the last row's values until I click on the new worksheet row twice
How can I prevent this?
Private Sub CommandButton17_Click() If UserForm5.Visible = True Then Unload UserForm5 End If If ActiveCell.Row = 1 Then MsgBox "Cannot Use This Row, Choose A Different One" Exit Sub End If UserForm4.Show vbModal End Sub
Private Sub CommandButton18_Click() If UserForm4.Visible = True Then Unload UserForm4 End If If ActiveCell.Row = 1 Then MsgBox "Cannot Use This Row, Choose A Different One" Exit Sub End If UserForm5.Show vbModal End Sub I won't post the form code here yet as both are quite large. Maybe someone has encountered this issue before?
I am making a user form so that others can enter their data into a database. In some of the fields I want to have a drop down list that will contain both all the options from a generic list, and any other items that have previously been entered into that field. For example I have a generic list of components but someone may feel that none of those listed describe their component so they will add a new one, I want this new one to then appear within the drop-down list for the next user,
I need to create a user form that will "pop up" and ask the administrator to enter the above details.
A - should be created automatically (ie last claim number + 1) B - user enters manually C - data retrieved from a list D - data retrieved from a list E - date is the date the information is entered
I am using a calendar control 11 in a user form. I would like to create a combobox on a user form that when you click the drop down button it opens the calender then the user can select a date which is then returned to the combobox. I beleive the way to do this is to trap the dropbuttonclick event. Tho it dosent seem to work.
Private Sub ComboBox2_DropButtonClick() Calender.Show ComboBox2.Value = Calender.Calendar1.Value End Sub
In VBA i have 3 userforms, the first 2 take the data and store them in variables. The 3rd form is supposed to take the variables from the other two forms and do some calculations with them. Although i cant get the 3rd form to take the stored variables from the other two forms. Is there a way to use stored values from other userforms?
User Form Basics - Populating Text Boxes. A few tweaks later and its reading the data just fine. Some of the specific form objects and range names have changed, but it's the same logic.
Anyway, this isn't just for display. I need to export the data back to the spreadsheet. So, I plugged this line into the event handler for the "Save & Exit" button on the sample form in the other thread:
I am using the following code to create a custom command menu.
Sub AddMenus() Dim cMenu1 As CommandBarControl Dim cbMainMenuBar As CommandBar Dim iHelpMenu As Integer Dim cbcCustomMenu As CommandBarControl On Error Resume Next Application.CommandBars("Worksheet Menu Bar").Controls("&New Menu").Delete On Error Goto 0 Set cbMainMenuBar = Application.CommandBars("Worksheet Menu Bar")..........................
I want to add a new button control at the bottom of the menu underneath the holiday control but it keeps adding it on the sub menu, which leads off the holiday button control. I want the menu to look like this.
Open Net 2 Access Add Employee Edit Employee Delete Employee Holidays (3 options on sub menu) *New Control
I have a little knowledge of Excel Programming and I am seeking advice and help. With reference to the http://www.exceltip.com/st/Create_Us...Excel/629.html, I managed to create the form but I somehow couldn’t get it executed. Attached herewith my file for evaluation.
there is some clever code to create a customized menu in a dynamic Add-Ins section of the Excel ribbon; this section disappears when the workbook is deactivated and re-appears when it is activated. The custom menu has 2 main items each of which can launch a macro. There is also a 3rd main item called "Next Menu" which cascades nicely to a sub-menu. That sub-menu can have several items of its own. Very cool code.
However, I am trying to add a 4th item in the main menu, say, "Next Menu2" which also cascades to a sub-menu. The problem I'm having is when I try to replicate this code to accomplish this, "Next Menu2" appears in the sub-menu of "Next Menu", rather than as a separate (4th) main item below "Next Menu".
I believe there was another post (not sure of the date, but has since expired) which asked basically the same question as mine. There was a reply with code saying "This should work" but when I tried it, it didn't help.
I want to create a submenu to an already existing user defined menu.
After creating and saving the sub menu using Tools ->Customize ,it works fine. But when
I reopen the Excel sheet it is not found.
I could not find any macro related to the original User menu.Also this menu gets displayed after the AUTO OPen macro in my excel has worked. This menu gets displayed for only that workbook and not for others.
I have been trying to find out a way to create Sub menu for that ,but could not?
I want to have a spread sheet where a user will pick an option from a drop down list, then based on that option choice, have a different cell populate with a specifc drop down menu.
Example:
Cell A1 has a drop down with three choices (1,2,3) User selects option 1 Cell B1 will now have a drop down with options A,B,C However: If user selects option 2 from A1 Cell B1 will now have a drop down menu with options X,Y,Z
Having recently started to get involved in Visual Basic I have managed to write some code that has removed all of my menus except for File and Help. In a blind panic I deleted what I think was the offending VB code in a vain attempt to return the menus. This didn't work. I am now stumped.
Also, I managed to change the way the Cell selection works when I press Return. When I press Return, Excel now selects the cell to the right of the one I was in rather than the one below it. Is there a way I can change this back?
I have a workbook which uses the code below to create a new menu upon opening. I have now used this same code in a second workbook to create a different menu. both work OK on their own However if by chance both workbooks are opened at the same time only one menu is shown. Is there a way I can change one of these to create a second menu if the first one is already there?
I have this code which adds one menu at the top of the worksheet and I want to add more. My current sheet has a large number of scripts liatsed under it for different purposes and I'd like to divide it into different menus.
I would like to make a form where the user has to select from a drop down list several options, and that depending on the pick the drop down list below shows different options. example: For the question "what food do you want to eat?" you can select pasta, pizza or dessert.
Now if that person pics dessert, the 2nd drop down menu should shom him again a number of desserts he has to pick. And again below another one depending on what he chose.
I have a problem I am working on (see attachment for better understanding).
I have 4 sheets 1) quote 2) invoice 3) delivery note 4) products and settings
Now in the quote sheet I am trying to add a way of from a drop down menu, selecting the product from the products sheet and then a new line will be added automatically.
Then what ever is in the quote sheet is automatically copied to the invoice and delivery note sheet.
If I have a cell that uses a list for drop downs (ie "Make" can be any of several different Fire Alarm Panel Types) and a second cell that I want to use to represent "Model Number" is there an IF the model is A from the Make list, THEN the next cells drop down list represents the model numbers under that Make?
I am trying to program a drop down box at the top of a column so that when one of several options in the drop down are selected, a corresponding price list is displayed in the column below.
Ok, so I have this neat little macro that on right-click brings up a custom context menu that displays a few different options - for example one such function is simply copying the selected cell content to a (specific) different sheet. It is a very useful feature in the context I am normally using it to merge information from different locations in a new structure (well, I think this is irrelevant, but just letting you know basically what I am doing).
Anyhow, to implement the custom context menu, I am using events in the ThisWorkbook object, namely Activate to add context menu entries and DeActivate to remove them if switching workbook.
Now, if I receive any workbook from someone else, I'd like to add this feature to get the custom context menu easily without having to copy the received workbook into a new workbook (it's a bit of a hassle, and ideally, if the received workbook has any other macros, this function could just be merged). I was thinking using an add-in to achieve this, but using the ThisWorkbook events in the add-in doesn't trigger the events (I guess because the hidden workbook in the add-in is never "Activated" or "DeActivated").
I am trying to force movement between multiple drop down menus. The menus are independent of one another. I want the user to only be able to select the information in the menus.
Manufacturer:System:Part Number:Material Description: I want to make each field a "pulldown menu".
For simplicity, lets say I have three Manufacturers "A", "B" & "C"
Each Manufacturer has three systems "1", "2" & "3"
Each System has 100 parts "1-001" thru "1-100", "2-001" thru "2-100" & "3-001" thru "3-100". Each part has a corresponding description such as "Horizontal", "Vertical", "cover", etc...
I need to keep all of the manufacturers, systems, parts and descriptions in one excel workbook. I have no preference to how that information is built (tabular, list, etc..) I would like the workbook in which i want the fields above to be separate, so I only have to keep updating one master file that all of our takeoff sheets would be linked to.
when I select a manufacturer, I only want the available systems for that manufacturer to show up in the next pull down menu, then for that system I select I only want the available parts for that system to show up in the next menu. the descriptions need to correlate with the parts I select.