Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Programmatically Extracting Validation List

I have a selection that has a validation list attached to it and I'd like to
extract the list that's tied to it programmatically. How would I go about
doing that?

Thanks,
Barb Reinhardt
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Programmatically Extracting Validation List

Say you want the data validation list associated with the active cell

dim address as string
dim rg as range
address=activecell.Validation.formula1
set rg=application.range(address)

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Barb Reinhardt" wrote:

I have a selection that has a validation list attached to it and I'd like to
extract the list that's tied to it programmatically. How would I go about
doing that?

Thanks,
Barb Reinhardt

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Programmatically Extracting Validation List

ACtually Formula1 returns '=' in front of the range address. So instead, use:
address = strings.replace(activecell.Validation.formula1,"=" ,"")
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"sebastienm" wrote:

Say you want the data validation list associated with the active cell

dim address as string
dim rg as range
address=activecell.Validation.formula1
set rg=application.range(address)

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Barb Reinhardt" wrote:

I have a selection that has a validation list attached to it and I'd like to
extract the list that's tied to it programmatically. How would I go about
doing that?

Thanks,
Barb Reinhardt

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
Setting Data Validation Programmatically LoDawg Excel Programming 3 August 25th 06 04:32 AM
Programmatically query Excel drop-down list ? diglas1 via OfficeKB.com Excel Programming 2 June 9th 06 11:36 AM
Retrieving list of worksheets programmatically Scott Bass Excel Programming 3 July 2nd 05 01:36 PM
Validation (Drop down list vs simple text length validation) Jason Morin[_2_] Excel Programming 1 April 27th 04 04:56 PM
Validation (Drop down list vs simple text length validation) Pete McCosh Excel Programming 0 April 27th 04 03:49 PM


All times are GMT +1. The time now is 04:15 AM.

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"