Dropdown list in VBA InputBox

TimvMechelen

Board Regular
Joined
Nov 7, 2016
Messages
121
Hi,

Is it possible to get a dropdown list with VBA InputBox?

The dropdown list has to refer to the table[column]: "TabelMatriaalinformatie[Materiaal:]"

Thank you for you time.

A part of the VBA code i have now:
Code:
Dim Materials As Variant

Sheets("Beginblad").Select
Materials = Inputbox("Material:" , "Algemene gegevens product",Range("D13"))
Range("D13").Value = Materials

Now you can put in something manualy.
Can this be a dropdown list?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Sorry it's not possible with a built-in InputBox.:eek:

However it would be straightforward to create your own 'inputbox' with a dropdown using a userform.
 
Upvote 0
You could create a userform with a droddown to mimic an inputbox.
 
Upvote 0
You could create a userform with a droddown to mimic an inputbox.

How can i do this?
A dropdown is not necessary, but something sigmilar where i can choose my materials from a list is fine too.


Something like this maybe?
populate_userform_list_10.png
 
Last edited:
Upvote 0
Open the VBE (ALT+F11), goto Insert>Userform...

You should now have a blank userform that you can add comboboxes, listboxes, buttons etc.

If you don't want to use a userform you could set up an in-cell dropdown in D13, or any other cell, using Data>Validation... with the List option.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,812
Members
449,048
Latest member
greyangel23

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