LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
svb svb is offline
external usenet poster
 
Posts: 6
Default validation list length issue

When I select an item in say cell A:1, based on my selection a list is
presented in cell B:1 in the form of a validation list where the list values
are dynamically retieved from a database. This code has worked for ages,
however some of the lists are now fairly large.
I now receive the error,
---------------------------------------------------
Run-time error '-2147417848(80010108)':

Automation error
The object invoked has disconnected from its clients

---------------------------------------------------

If I reduce the number of items in the list then it works. So the question
is is there a limit on the number of items I can have in a validation list. I
don't want to use combo box objects so if there is a limit then suggestions
for a better way of doing this would be appreciated. Code snippet below.

'//strList is a comma-delimitted list of values retrieved from a db. May
have up to 200 values.
strList = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"
'Populate list with list items from db
With curValueCell.Validation
..Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _ '//debugger
selects this line as in error
Operator:=xlBetween, Formula1:=strList '//debugger selects this line as in
error
..IgnoreBlank = True
..InCellDropdown = True
..ShowInput = False
..ShowError = False

End With

ps. If above variable 'strList' contains more than 65 items the above error
occurs. It also doesn't work if I manually add a 65 item comma-delimitted
list directly into the source box via data-validation menu.

 
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 Length Alex Mackenzie Excel Worksheet Functions 4 November 1st 05 01:27 AM
Data Validation and List Length Tom Kolkmeier Excel Programming 1 October 19th 04 10:51 PM
Validation (Drop down list vs simple text length validation) Bob Phillips[_6_] Excel Programming 2 April 27th 04 07:47 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 08:16 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"