Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo box change
Hello!
I've got a userform where I feed text boxes and combo boxes from some fields on a sheet each time that form is initialized. In the UserForm_Initialize procedure I feed my combo box cb_status like this : Private Sub UserForm_Initialize() With cb_status .RowSource = "" .AddItem "P" .AddItem "C" .AddItem "N" .AddItem "A" End With cb_status.Text = Cells(1, 3) 'Get the value already entered from the sheet End Sub This works perfectly, but the problem occurs when it reaches the cb_status_Change because I've got conditions in there which I would like the program to take action only when the user selects a value on one own. I see that the program considers that when it brings the value from the sheet (when initializing the userform) cb_status.Text = Cells(1, 3) it is considered like a change. Private Sub cb_status_Change() If cb_status.Value = "A" Then If MsgBox("Are you sure to cancel?", vbYesNo + vbQuestion) = vbYes Then frm_Bid.Enabled = False Else cb_status.Value = "" End If Else frm_Bid.Enabled = True End If End Sub How do I tell the program not to take action when it doesn't come from a human action, but I still want to see the info from the sheet showing as the value? I hope I am clear with my explainations... Thanks for your help! gmore |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Getting Combo boxes to change options based on other Combo boxes. | New Users to Excel | |||
Change of behavior in Combo Box | Excel Discussion (Misc queries) | |||
Using VB to change Combo box selection | Excel Programming | |||
Help with a Combo Box Change Event | Excel Programming | |||
Before and after combo box change | Excel Programming |