Using of Combo box

nirmalachr

New Member
Joined
Nov 25, 2013
Messages
26
Hi,

I am new to this forum and new to vba. my problem is that i am not able to change/update the cell value.

eg:- i had created a form to enter the proposal details and it will save on submit. Now i have created one more form to modify the proposal status which i already enterd and saved. for this i am using to comboboxes in which one will display the proposal name and another combobox will display a new value.

Proposal name Status
Mike Recieved
George Under process
killer santioned

Now i want to change the status of the mike using two combobox by selecting name.

Please help me.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi and welcome to the Board
Tell me if you have any trouble understanding the example below:

Code:
' this code goes at the UserForm module
Private Sub UserForm_Initialize()
Dim lr%
ComboBox2.List = Split("Received/Under Process/Sanctioned", "/") ' status
lr = Sheets("Sheet1").Range("a" & Rows.Count).End(xlUp).Row 'last row
ComboBox1.List = Sheets("Sheet1").Range("a2:a" & lr).Value  ' proposals
End Sub
Private Sub CommandButton1_Click()  ' update sheet
Dim c As Range
' find proposal
Set c = Sheets("Sheet1").Range("a:a").Find(ComboBox1.Value, LookIn:=xlValues)
If Not c Is Nothing Then c.Offset(, 1) = ComboBox2.Value    'new status
End Sub
 
Upvote 0
Hi worf,with your help i had finished my requirement,but now one problem raised that if the same name exist the sheet it is updating the first one but not the correct one which i had chosen from combobox.

Can u please help out from this.

Manu
 
Upvote 0
Hi
Are the names unique? I guess not, according to your description. Are they like
Mike 1
Mike 2
Mike 3?
If there are repeated names on the list, what should we do? Update all of them? Only the last one?
You may exemplify with your actual data.
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,730
Members
449,465
Latest member
TAKLAM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top