Moonbeam111
Board Regular
- Joined
- Sep 24, 2018
- Messages
- 85
- Office Version
- 365
- 2010
Hi all. I have created a userform combobox with 4 items. One from each of range("D135:D138"). I have it initialized with this data:
The combo box does appear. It shows the 4 items in the dropdown list, however I dont know how to configure the command button. I have a value in Range("F136") [lets call it oranges] I want to copy the word oranges based on the item I choose.
Lets say we have these as the 4 items:
Apples in range d135
Pears in range d136
Bananas in range d137
Grapes in range d138
If I select Pears I want it to replace the word pears with the word in range("F136") [Oranges]
I am new to using user forms so I cannot figure out how to do this.
VBA Code:
Private Sub UserForm_Initialize()
Me.ComboBox1.List = Worksheets("Sheet1").Range("D135:D138").Value
end sub
Lets say we have these as the 4 items:
Apples in range d135
Pears in range d136
Bananas in range d137
Grapes in range d138
If I select Pears I want it to replace the word pears with the word in range("F136") [Oranges]
I am new to using user forms so I cannot figure out how to do this.