I'd like to say that this Forum is helping me very much when reading so many useful topics, get help from ppl here. From nothing I advanced my program very much. About my problem here:
I have an Excel Column with Dates (dd-mmmm-yy) and an UserForm/ComboBox. I'd like to add only the unique dates from the Excel Column to the ComboBox. The Excel Column Range is updating with new dates.
I tried to use RowSource but i don't know how to get the unique dates with RowSource. Maybe RowSource is not a good decision.
I have one userform that loads combobox values upon userform Initialize. Though through a second userform changes can be made to anotherworkbook this workbook is saves any changes. when i close the second userform i need to rerun the 1st userform Initialize event to update the combobox's incase changes have been made.
I have a userform with a combobox that has three items to choose from: Blue, Red, and Yellow. When a user selects one of those options, I would like another combobox to appear on my userform with a specific list for that option.
I'm trying to make a userform that has 2 combo boxes. I have just 3 columns right now.
Procedure GrpADA-QSI DescProcedure GrpAnesthesia And Drugs9210-LOCAL ANESTH/NO SURGAnesthesia And DrugsAnesthesia And Drugs9212-TRIGEM BLOCK ANESTHCrowns And BridgeAnesthesia And Drugs9215-LOCAL ANESTHESIADenturesAnesthesia And
[Code] ........
I copied and pasted Column A into Column C and then removed duplicates. I named Column C 'ValList' and placed it in the RowSource for ComboBox1. What I now want is for ComboBox2 to populate based on my selection in ComboBox1. There are no duplicates in Column B. Duplicates are in Column A.
I also named Column A 'Proc_Grp' and Column B 'ADA_QSI_Desc'
For the properties in Combobox2, I left the RowSource empty. (that's correct right?) Because there's going to be a code that links Combobox2 to Combobox1... I think...
Is it possible that i fill the CB.list with range().value so the values are in Column 'A' and in Column 'C' and if i enter the field and select value then i see value from column 'A' & value in Column 'C'?
Then if i pick one value then the CB.value = the value from Column 'A' only, Can i solve it some how?
Carrying on from my calculation problem which now has been solved i am needing help with comboboxes
i have a combobox21 which i have made a dropdownlist ie Types of products from Product1 to Product 16 inclusive (i have sorted this)
i also have another 28 comboboxes, which of the 16 products i pick in combobox21 i need each of the other 28 comboboxes to display the the sub products
products and sub products are stored on sheet1 in the excel file as below
A B C D 1 Product1 Product2 Product3 Product4 etc ......... 2 P1A P2A P3A P4A 3 P1AA P2AA P3AA P4AA 4 ETC ETC ETC ETC
So if i pick Product1 in Combobox21 then in each of the other comboboxes i need to be able to select P1A OR P1AA ETC .....
i have a named range of products A1 to O1 Called PRODUCTS
i will have to create 16 mores ranges for the items in each product but that is no problem
I have a userform that I wish to be a front page for a work sheet containing personal staff information. I would like it to self populate according to a selection from a combo box (Surname). So far I am using the code below however where this code encounters those with the same surname it only displays the first row it comes across. Each row does have a staff ID number that is unique but I cannot search by this on its own as it would not be user friendly.
VB: Private Sub ComboBox1_Change() Dim r As Range Set r = Sheet2.Range("A:A").Find(What:=ComboBox1.Text, lookat:=xlWhole, MatchCase:=False) If Not r Is Nothing Then
I want it to populate a combobox in a userform. Should it go in the code segment for the userform, in a module, or some other place? The following is code I originally found (by Leith Ross of this board) to find the last row in column "A", and load the combo box "ComboBox1"
textbox input will be a house number combobox will be a list of all the street names that have that house number in my database
column Q are house numbers, column R are street names
when a user inputs a number into the textbox and tabs to the combobox,
for each cell in column Q of workbooks("proposals.xls").worksheets("database") that has the textbox1.value I want the cell value of .offset(0,1) to be added to the combobox.
Basically I want it to look similar to the vehicle search on auto trader, or whatcar, where you first chose the make, then use a second combobox for the model (dependent on the choice made in the first combobx.
I am trying to add a list of items to a combo box which is in a user form using vba. Find the file as attached. My code is as follows: when i double click on the combo box it opens editor.( 4th item: Frequency )
Private Sub ComboBox1_Change() With .ComboBox1 .AddItem "Y" .AddItem "M" .AddItem "D"
I have created a user form that needs dependent combo boxes. I have created multiple lists to use for different types of contacts and just want to use the if function to say that if combo box one's value is this, combo box two will use this list in its drop down box. This is what I have at the moment below.
cbosoi is combo box one and cboname is combo box 2. If I select Duty_manger from the first list I want it to point to the Duty_Manager list for combo box 2. It does that but it selects the duty manager list for anything I select in combo box one!
If cbosoi.Value = duty_manager Then Me.cboname.List = Worksheets("lookuplists comms").Range("duty_manager").Value End If
I am a total noob when it comes to userforms. I want to create a userform with a simple combobox that contains 4 different selections. Along with this combobox will be a Submit button and a Cancel button.
I'm attempting to add the values for a combobox and (2) text boxes to a list box on a form. The list has 3 columns. When I run code to add to the list box the values are added on separate rows instead of the same row. See code below and attached screen shot.
VB: Private Sub cmdAddToList_Click() Dim i As Integer Dim iRow As Integer If Me.cboParts.ListIndex = -1 Then Exit Sub For i = 0 To Me.lstParts.ListCount - 1
I have a combobox on a userform that I have set the columncount to 3, so it displays data from columns A, B, and C when the combobox dropdown is used. However, once someone makes a selection from the dropdown, only the item from the first column is displayed in the combobox. Is there a way for me to show the info from all 3 columns once a selection is made?
combobox1 is filled with values. I want the user to select one from combobox1 and combobox2 get filled in with unique values based on combobox1
Sheets Quote has 2 columns
Customer Job Stanley 1 Stanley 2 Fred 1 Stanley 3 Stanley 3 Stanley 3 Stanley 4 Fred 1
combobox1 is filled in with Stanley and Fred
based on the user selection (as an example Stanley)
I want combobox2 values to be 1,2,3,4 (having 3 listed only once)
Is there a way to modify the code below to verify that the (e) .offset(-1,0).value = combobox1
Is there a different option to use?
Code: Public Sub fill_job_num() Dim v, e On Error GoTo error1 With Sheets("Quotes").Range("B2:B50000") v = .Value End With With CreateObject("scripting.dictionary")
Is it possible to create a data base with the given sample below?
COLUMN A COLUMN B COLUMN C COLUMN D COLUMN E
UNIT TYPE CONDITION NAME TELEPHONE NO. DATE
1+1 SALE Name1 tel1 3-Oct-12
[Code] ...
The Userform has 2 ComboBoxes and 1 ListBox
ComboBox1 will be the one of the Column A Value ComboBox2 will be the one of the Column B Value
I did handle that ComboBoxes already....What I need only, when those ComboBoxes been selected the related datas will fill into the ListBox accordingly...
I have a Userform where I use a ComboBox to populate raw A from a worksheet.
I use this form to update new data that relates to the selected item in the ComboBox.
In that user form, when I select an item from the ComboBox, I idetifay it's raw and display the data from columns B,C...to I in text boxes on the Userform.
I then set the "Enable" property of the text boxes that has data to "False" so that field cannot be updated again.
What I do today is if all the fields where updated, a message box will say "All fields are full" and I clear the form.
Now I want to improve my selection by removing items from the ComboBox if all the "needing update" columns are field.
By this I want to filter out the items that where already updated before and only show the ones needing update.
Here is what I have, I need to change the UserForm_Initialize section so it will only show the rows needing update.
Code:
Private Sub UserForm_Initialize() 'Populate "Cards" Combobox. Dim rngCards As Range Dim ws As Worksheet Set ws = Worksheets("Rejects")
I am trying to populate (via VBA) a textbox/combo box from one user form to another user form.
The first user form has a room number in a text box1. If certain conditions exists, a button is selected to bring up another user form (both forms are modeless).
I want to pass/populate some of the 1st user Form info into the other user form.
I have tried the on initialize textbox1.value = textbox other.value but no dice. I can populate a user form text box from a spreadsheet but from box to box in separate user forms has me a little stumped.
I've have a combobox on a userform which should refer to a cell on a worksheet directly. E.g. The dropdown list that feeds to box is on Sheet2 range C1:C6 Whatever is selected should be copied to Sheet1 cell B18.
Now, if I populate cell B18 manually, it will pick it up, but if I then change the combobox selection, cell B18 either doesn't change or goes blank.?
I have a userform1 on there a combobox1 and a frame1. In that frame1 I want a number of labels to be added named "name" & number. The number varies depending on the value in combobox1. If combobox1 = "1" then I want 20 labels to be added. if combobox1="2" then I want 60 labels to be displayed.
label height=12, width=102, top=6 and left=6
for each following label the top = top + 14 and after each 10th label left = left + 120
If there's more than 30 labels then I need a scrollbar on the bottom of the frame to be displayed and so be able to see the other labels.
If the first value in combobox1 is "1" is selected and all is displayed and then I select "2" that is deletes all the current labels in the frame and then add 60 new labels.
I have a list of machine manufacturers in a comboBox and type of the machines they make listed on a excel sheet. When the user chooses the company from the combobox.list I want the machines types appears at the textbox below
Sheets("Sheet1").Shapes("ComboBox1").Select Selection.ListFillRange = "='Sheet1'!$b$15:" & comborange & "" where comborange = cell reference of the last cell in my range..
I have moved this combo box to a userform now and I'm trying to populate the box via one of the userforms triggers.. My problem is I can't figure out the syntax to select the combobox on the userform.. it doesn't seem to be handled the same way as when it was on the worksheet..
I've been trying for hours to populate a textbox on a userform based on a combo box. I'm including a zip of my workbook to see. (don't laugh to hard at my code, like I said I'm green...:) When you select a mix design in my form I want the next six combo boxes to populate. The way I have it now is based on one of the many examples found here, (none of which have worked for me so far, but this one said "the simplest way to do this is......") And I get an error 425 - "Object not found". I've done searches based on the error but haven't found an answer.
Using my workbook i want to modify the entries of a worksheet. If u hit the Commandbutton1 , u can see that i have a userform with 3 pages.
The 1st page is to create a formula The 2nd page is to modify the formula The 3nd page is to delete the formula
What i want is the following:
1-Using the 2nd page I want to select a formula description and then to modify the description or the formula or both. After that, if i hit the Ok button to save it.
2-Using the 3nd page I want to select a formula description and then if i hit the Ok button and Delete the selected formula i want the bar to move to the previous row of the deleted one. Eg.: If i delete the row 10 i want the bar to move to row 9.
3-At last ,if u think that u have to change parts of my code and make it better go ahead.
I'm trying to take a list of names from a worksheet and create in a userform a combobox that lists the names.
Private Sub Combo_Box_Leadoff_Click() Dim counter As Integer Combo_Box_Leadoff.Clear For counter = 3 To 16 Combo_Box_Leadoff.AddItem Worksheets(5).Cells(counter, 2).Value Next counter
In the properties window, I set the value equal to the first name in the list. The above code yields a combobox that is blank except for the value set in the properties window. When I do not set an initial value, I get a completely blank combobox. I'm pretty new to VBA, and I've manged to figure out all of the macros I need so far, but setting up the user form has proved surprisingly difficult.
I'm running in to some problems on creating a Userform. I will try to explain it as best as possible. Right now I have a userform set up with 2 ComboBoxes. Here is my current code. It's not near complete.
Private Sub CommandButton1_Click() Set ufStart = Worksheets("Data"). Range("AP4") Set valNames = Worksheets("MasterData").Range("AA6") Set valMonths = Worksheets("MasterData").Range("H3") Set SelMonth = ComboBox2.ListIndex Set SelName = ComboBox1.ListIndex If TextBox1.Value > 0 Then ufStart.Offset(SelName, SelMonth).Value = TextBox1 Else: End If End Sub
The way it's supposed to go, is if TextBox1.Value is greater then 0... then go to UfStart and Offset by Row, which is ComboBox1 Selection Index Value and by Column, which is ComboBox2 Selection Index Value. I can't get the sub to get past Set SelMonth = ComboBox2.ListIndex.