Display the contents of Data Validation List in Text box

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,362
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
This might sound like a weird request, but is it possible to display the contents of a Data Validation List in a TextBox.

On a sheet I'll have a TextBox, TextBox1. In column T, I have a range T4:T10 which all have individual Data Validation Lists.

When the cursor placed on T4, can TextBox1 show the contents of the Data Validation list. The list might be something like, Red, Black, Blue, and Green.

Of course, I know the user can click the drop down arrow of the Data Validation in that cell and see the contents, just curios if this selection can be shown in a TextBox.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
This link may help:

I placed a validation list in I5 containing values "a, b, c, d" and ran the following, you could substitute s for your TextBox:

VBA Code:
Sub test()
Dim s As String
s = [I5].Validation.Formula1
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,214,522
Messages
6,120,022
Members
448,939
Latest member
Leon Leenders

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