ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cells Data Validation (https://www.excelbanter.com/excel-programming/350711-cells-data-validation.html)

Cristi[_2_]

Cells Data Validation
 

Hi,
I have two cells A1 and A2. I need to use data validation for A2. Based
on value in A1, I need to query a database (Access) and return some
values. I want to find these values in the drop-down list in the
validation data for A2 cell. What do I have to put in Source field in
Data Validation form? One way would be to have in this Source field
this: -= MyQuery- , where -MyQuery -is a name already defined. The
issue, for me, is how to create programmatically, in VBA, the list of
values ("item1", "item2",...,"item_n"), and how to populate the name
-MyQuery -with values from the query. :confused:

Any help will be appreciated. Thanks.


--
Cristi
------------------------------------------------------------------------
Cristi's Profile: http://www.excelforum.com/member.php...o&userid=30579
View this thread: http://www.excelforum.com/showthread...hreadid=502289



All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com