Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data validation list using filtered range michaelberrier Excel Discussion (Misc queries) 3 March 2nd 11 12:13 AM
Question about range in validation list Hank Excel Discussion (Misc queries) 2 March 13th 09 08:24 PM
Edit validation list range Kim K Excel Discussion (Misc queries) 2 November 1st 06 06:44 PM
Cell value as named range for validation list [email protected] Excel Programming 2 December 10th 05 11:05 PM
How to mention a range of validation list in VBA? norika Excel Programming 2 June 15th 05 12:23 PM


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"