Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation list to a Range?
Hello, I'm wondering how to add a Validation List to a Range. I'm trying this For i=1 to 5 Cells(i,1).Validation.Add Type:=xlValidateList Formula1:="=$D$1:$D$10" next i but it's not working. Can you help me out _Is_it_possible_without_looping?_ Thank you in advance Regards Dr.il -- Dr.Il ----------------------------------------------------------------------- Dr.Ile's Profile: http://www.excelforum.com/member.php...fo&userid=1597 View this thread: http://www.excelforum.com/showthread.php?threadid=55023 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation list to a Range?
Thank you Ardus, but I'm not satisfied with solution. I'm trying with this but it's not working (I need n for looping): Dim n As Integer n = 10 Range(Cells(1, 1), Cells(n, 1)).Validation.Add Type:=xlValidateList, _ Formula1:="=$D$1:$D$10" Regards Dr.il -- Dr.Il ----------------------------------------------------------------------- Dr.Ile's Profile: http://www.excelforum.com/member.php...fo&userid=1597 View this thread: http://www.excelforum.com/showthread.php?threadid=55023 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation list to a Range?
Your code is syntactically correct, and runs without any problem.
Could you post the surrounding code, so that I can understand what you intend to do? HTH -- AP "Dr.Ile" a écrit dans le message de news: ... Thank you Ardus, but I'm not satisfied with solution. I'm trying with this but it's not working (I need n for looping): Dim n As Integer n = 10 Range(Cells(1, 1), Cells(n, 1)).Validation.Add Type:=xlValidateList, _ Formula1:="=$D$1:$D$10" Regards Dr.ile -- Dr.Ile ------------------------------------------------------------------------ Dr.Ile's Profile: http://www.excelforum.com/member.php...o&userid=15975 View this thread: http://www.excelforum.com/showthread...hreadid=550231 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation list to a Range?
Sorry Ardus, I don't know, but the code is running perfectly:). Anyway, thanx. Dr.il -- Dr.Il ----------------------------------------------------------------------- Dr.Ile's Profile: http://www.excelforum.com/member.php...fo&userid=1597 View this thread: http://www.excelforum.com/showthread.php?threadid=55023 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data validation list using filtered range | Excel Discussion (Misc queries) | |||
Question about range in validation list | Excel Discussion (Misc queries) | |||
Edit validation list range | Excel Discussion (Misc queries) | |||
Cell value as named range for validation list | Excel Programming | |||
How to mention a range of validation list in VBA? | Excel Programming |