I have a user form set-up that has four option buttons on it. I have them set so that when the user clicks on one of them the others are unset, however for some reason the user is having to double click on the buttons before they are set (with a black dot in them). It is as if the first click sets focus and the second click sets the button.
Can i amend it somehow so that the user only has to click once?
this is my first attemp at doing a "userform". I am looking for some help in creating a user form that enables users to choose items from drop down boxes, which shows next level drop down list items, then down to final drop down list with information based on first two choices. I've attached the sample file for reference.
I have a form using text boxes to enter some data into a spreadsheet. These text boxes appear in pairs for any single point (e.g., name ; location). Does anyone have a code which can actually define how many of these pairs will appear on the form when loaded? For example if there are 5 points to be defined the form should have 5 pairs of these text boxes. The maximum number of these pairs is around 10 and I could make a form with a 'standard' number of 'pairs' but that's not really it. I've tried to attach the form but it did not work
I have a sub that I need to call multiple times. I'm trying to figure out if there is a better way to do this rather than write out the call each time:
AYForm = "UserForm2.txtAYMonths" & i AYPForm = "UserForm2.txtAYPercent" & i SummerForm = "UserForm2.txtSummerMonths" & i SummerPForm = "UserForm2.txtSummerPercent" & i JobForm = "UserForm2.cboJobClass" & i NameForm = "UserForm2.txtName" & i
For i = 1 To 15 Call FormatAY((AYForm), (AYPForm), (SummerForm), (SummerPForm), (JobForm), (NameForm))
' Call FormatAY(UserForm2.txtAYMonths & i, UserForm2.txtAYPercent & i, UserForm2.txtSummerMonths & i, _ ' UserForm2.txtSummerPercent & i, UserForm2.cboJobClass & i, UserForm2.txtName & i) Next i
the sub FormatAY has six arguments; 5 textboxes and 1 combobox. Since the names of these items are the same except for a number (example UserForm2.cboJobClass1, UserForm2.cboJobClass2, UserForm2.cboJobClass3 etc...), I wanted to write a for loop and use a variable to represent the last number. Is this even possible? The couple of ways that I have tried this, I get either a member not found, or ByRef error.
I want to be able to call one user form from multiple ActiveX command buttons. The problem is, the number of command buttons depends on user input on another worksheet, so it's variable.
I've renamed all of the command buttons so they are named "CommandButton" & i, where i is an integer between 1 and, say, 200. I want each of these buttons to direct to the same UserForm where additional information can be entered.
I can't think of a way around the event-handler procedure name.
Sub [Command Button Name]_Click
to call the User Form. I won't know the command button names, because I won't know how many there are (max i) until the user inputs.
Basically, I want to create a For loop through the max i and have the event-handlers call the user form
create a form that will look at the spreadsheet and figure out which of the 32 possible checkboxes will be used and resize accordingly. I can make it so that only the checkboxes I want are visible using the .visible property, but for the sake of aesthetics I'm wondering if there is a way to disable the checkboxes I don't want and to resize the form to fit the checkboxes I do want. I just don't want a form that looks like it has checkboxes put on it at random spots.
I have a Database and user form, in the user form i have a field named “Vehicle No” this is a combo box from which a user needs to select the Vehicle numbers, and all these are working fine now, I need your help in the following:
When user selects the second field named "Select Vendor name" i need a pop up window which shows all the Vehicles belongs to the vendor which they have selected, and with the popup window user selects the vehicle number then the Vehicle number combo box should be filled.
Currently users have to select by scrolling through Combo box which takes long time and difficult to find by scrolling.
I need to create a form that if you were to enter a name in the text box it would fill all the information across that row into other boxes on the form. Basicly if I type John Doe in the text box it would look in col A for John Doe and then put whats in the cells on that row into different boxes on my form. I have tried searching but I have had no luck. Im very new to forms so this is a great experience.
I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.
What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)
I have created a registration workbook for this year's youth sports league. All of the information is entered into a User Form and separated onto it's appropriate sheet designated by the child's age. Next year, I would like to use this year's workbook to look up returning players.
Will it be possible to add a "lookup" button into my form, or create a lookup program, that once the registrar clicks on the correct player, the information is plugged into the User Form, the registrar adjusts the age and any necessary info, presses enter, and the information is copied into the appropriate category in the new workbook? I haven't worked with User Forms long enough to know if they can be filled in that way, but if this can be done, you are the people who would know.
I'm using a series of user forms for data entry to a workbook, some of them open next stage user form on completion (OK cmd button).
All that is working fine, but I'd like the initial form to close on showing the next one. I've tried adding Unload and Hide commands following the frmInsertEntry.Show (Next stage form), to no avail, but I'd like this user form to close or hide at the end of the sub.
Private Sub cmdContinueType_Click()
ActiveWorkbook.Sheets("Records").Activate 'Select starting cell in record sheet Range("N3").Select
Do If IsEmpty(ActiveCell) = False Then ' Search for next empty cell ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True
If optDrillType = True Then frmDrillEntry.Show Else frmInsertEntry.Show End If
I have two linked ComboBoxes on a form. There are 10 Textboxes populated by ComboBox2’s choice. These controls are situated on two frame controls which are used for visual groupings only. I would like to clear everything except Combo1 when Combo1’s value is changed. ( Combo1 is a filtered key list using the dictionary. Script code)
I’ve written a small sub that is called to clear the textboxes, but its not reliable every time. It seems that if the scroll bar is used, and the user chooses Combo1 choice “NUTS/SEEDS”, the boxes aren’t cleared. In fact it will show the “Walnuts” info in Combo2.
When I put form controls onto a spread sheet is there anywhere I can easily see and access its properties? Format Control is lacking many values and I do not see them in the vba project toolbar. I am trying to get checkbox locations and checkbox numbers if possible. If there isn't an easy place to see these is it still possible to get the checkbox locations in VBA?
I'm making a form in excel to retrieve a number of welds. This number needs to be passed on to the next form to dynamically create an identical number of input fields (a set of text boxes and labels essentially). Any ideas on how I might do this? Is it even possible? I would like to avoid having 100 (my assumed maximum, it could get changed) sets of input fields and hiding the unused ones,
Imagine I have a form with a few controls on it. And the controls properties are set up at runtime.
Is there any way possible to save the property changes that were made at runtime to the controls themselves? I mean - short of manually editing all the controls at Design time?
This might be easier to explain by example. See dummy code below. Using this example - I want to find something that will save the Caption of CommandButton1 as "TestMe" (rather than have it only temporarily set at runtime).
My form controls (cmd buttons) and images don't appear or don't work. I was working on a macro to cut and paste a set of cells (protected sheet, I did unprotect it), and I noticed the cmd button tied to this disappeared. It then re-appeared but I couldn't engage it. This is part of a larger workbook that consists of a single page of cmd buttons that release specific worksheets (no activex). These buttons disappeared and re-appeared and don't work either. When I select the button I can see the cell underneath light up. It's like the image is there but nothing else?
The macros run fine from VBA editor. I was thinking the issue had something to do protections? There are more than 5 passwords (set on a worksheet) being used here, there is a fair amount of protecting and unprotecting going on, and I loop through the worksheets several times. Everything was working fine and now I'm stuck. I was getting a the-object-invoked-has-disconnected-from-its-client error related to an "insert cells" command on a co-workers computer, but not on my machine. This is actually what I was trying to solve when it crapped out. I would delete the buttons and create them all again, but I can't even select them to delete them.
I am creating a form that performs several different functions. I would like to force a sequence of these functions by enabling/disabling the controls based on a variable.
For example, a form as two buttons Button1 and Button2. By default, Button1 is ENABLED and Button2 is DISABLED. When Button1 is clicked, a macro is run, where an Enable_Button2variable is initialized to FALSE. The last line of the macro sets the Enable_Button2 variable to TRUE. Then, because Enable_Button2 is now TRUE, Button2 then becomes ENABLED.
I am trying to apply this strategy to a ComboBox, ListBox and CommandButtons. I'm not sure what event to trigger on to poll the Enable_Button2 to enable/disable the control.
I have been working on large project using Excel VBA for several days. My code seems to be working correctly, but I have more to do and now, when I drag an object from the toolbox onto a UserForm, the object is not added to the list of objects on the form. If I go back to versions of the project that I was working on several days ago, there is no problem. If I run "Workbook Rebuilder", the objects that I have dragged onto the form are then added to the object list, but I still can't add new objects to forms from within the VBA editor. Is the project corrupted, or is there some other explanation, and are there any fixes? The code runs about 50 pages, and there are over 20 forms, so redoing from scratch is only a last resort option.
Is it possible to create a number of command buttons, depending on the number of lines on a worksheet, and then have the code attached to the command buttons execute based on the position of the buttons on the sheet. For example, if I have a button positioned over, say A3, can the code execute based on the content of another cell in the same row. I imagine that the button would have to be linked to the cell, but I cannot see how that is achieved.