Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you have a dropdown pop-up box in Excel?

Status
Not open for further replies.

Groves22

Technical User
Jan 29, 2009
102
US
I would like a dropdown box pop-up on the screen, that would allow a user to select from 5 or so options. Is that possible?

I'm thinking it would be something like an InputBox, but you can choose which option, rather than type.

If that is something Excel can do, and you know, can you please provide a quick example?

Thanks
 



Hi,

You do not need VBA, if you use the Data > Validation --LIST Excel spreadsheet feature.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Why not an UserForm ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hey Skip...
I knew about the Validation feature in Excel. I was wondering if a box could popup on the screen, that would let me choose.

PHV...
I don't exactly know what that is
 
You can create a combobox similar to what is available in Access then fill it using VBA.
 


That's what the LIST feature does.

I usually give my list a NamedRange. Then I can have the list on a separate sheet. Just reference the RangeName when you define the list source.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


BTW, Data > Validation can be applied to a range.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip...
I guess that makes sense. I will just do that!
Thanks!
 
Even though you were quite rude to me in my thread, I wanted to add something in here...PHV Suggested

PHV (MIS) 3 Mar 09 15:12
Why not an UserForm ?


I think he meant a user form - created in the VBE, would that work for you? Allow the user to select from a box that would pop up?

If not, has your project been completed yet? If not, could you use something like:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'If Target.Row = Me.CommandButton1.TopLeftCell.Row Then Exit Sub
Me.ComboBox1.Top = Range("A" & Target.Row).Top
Me.ComboBox1.Left = Range("A" & Target.Row).Left
End Sub

You would of course have to change the "A" to the cell you want...but this way the cell can follow the user down as the next row is selected, and you could set this up so a user could save invdividual values for each row (if that is something that is needed), let me know if you want me to type of some code on how to do that, Id be happy to share

Good luck with your project!

- J
 
Hey Chomp..

Thanks for the tip. Right now I am just using a list generated in the document. However, when I go to clean up my code, I will definately come back and ask for some assistance (if needed)!!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top