VBA simple drop-down menu

Dimitris254

Board Regular
Joined
Apr 25, 2016
Messages
139
i'd like a simple "status" drop-down menu to appear in the selected cell.

the options are pre-defined:

"Not started" (appears by default)
"Work in progress"
"Finished"
"Not applicable"

I would like to define a name for the cells containing the status, so i don't know if a commobox can work.

something like:
Rich (BB code):
With ActiveCell

' drop-down menu
create drop-down list
option 1= "Not started" --> set default
option 2= "Work in progress"
option 3= "Finished"
option 4= "Not applicable"

' define name
.Name = "status"

End with
 
Highlight the drop down and go to Data Validation. Check what's in there. It should start with =
 
Upvote 0
it's the named range, "_100Status", no options appear

edit: the named range appears in the Name Manager correctly
Refers to=IDs!$A$102:$A$105
Value ={"Not started", ...}
 
Last edited:
Upvote 0
looks like i fixed it:
Rich (BB code):
        .Offset(12, 0).Select        
With Selection.Validation
            .Delete
            .Add Type:=xlValidateList, Formula1:="=IDs!A102:A105"
            .InCellDropdown = True
        End With
        Selection.Name = "_" & q_id & "Status"

last thing left (if doable): how to i set a default value to appear? :)
 
Last edited:
Upvote 0

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