ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   populating a validation list (https://www.excelbanter.com/excel-programming/417804-populating-validation-list.html)

Risky Dave

populating a validation list
 
Hi,

I have some code that populates a data validation list automatically. The
list has approxiately 20 entries and the VB code will not allow me to have
that many - it throws up an error message when trying to run the line.

To get round this, I have simply pointed the code at a range of cells way
off from where the user will be working. The problem with this is that if
rows are deleted, the references become invalid, as the list of valid entries
effectively "moves up" the page.

Can anyone suggest another way around the limit VB is placing on the number
of items in my list?

TIA

Dave

Daniel.C

populating a validation list
 
Hi.
It's a bit too complex to explain here. Have a look at the file at :
http://www.filedropper.com/dino_2

--
Regards.
Daniel
"Risky Dave" a écrit dans le message
de news: ...
Hi,

I have some code that populates a data validation list automatically. The
list has approxiately 20 entries and the VB code will not allow me to have
that many - it throws up an error message when trying to run the line.

To get round this, I have simply pointed the code at a range of cells way
off from where the user will be working. The problem with this is that if
rows are deleted, the references become invalid, as the list of valid
entries
effectively "moves up" the page.

Can anyone suggest another way around the limit VB is placing on the
number
of items in my list?

TIA

Dave




Daniel.C

populating a validation list
 
Sorry for wrong posting
Daniel
"Risky Dave" a écrit dans le message
de news: ...
Hi,

I have some code that populates a data validation list automatically. The
list has approxiately 20 entries and the VB code will not allow me to have
that many - it throws up an error message when trying to run the line.

To get round this, I have simply pointed the code at a range of cells way
off from where the user will be working. The problem with this is that if
rows are deleted, the references become invalid, as the list of valid
entries
effectively "moves up" the page.

Can anyone suggest another way around the limit VB is placing on the
number
of items in my list?

TIA

Dave




Dave Peterson

populating a validation list
 
If the list shouldn't change (the user is deleting the row for a different
purpose), why not just put the range on a separate sheet--and hide the sheet.

If you do this, then you'll have to name that range.

Debra Dalgleish explains he
http://contextures.com/xlDataVal01.html#Name

And if that list can grow/contract, you may be able to use a dynamic range name:
http://contextures.com/xlNames01.html#Dynamic
(also from Debra's site.)

Risky Dave wrote:

Hi,

I have some code that populates a data validation list automatically. The
list has approxiately 20 entries and the VB code will not allow me to have
that many - it throws up an error message when trying to run the line.

To get round this, I have simply pointed the code at a range of cells way
off from where the user will be working. The problem with this is that if
rows are deleted, the references become invalid, as the list of valid entries
effectively "moves up" the page.

Can anyone suggest another way around the limit VB is placing on the number
of items in my list?

TIA

Dave


--

Dave Peterson


All times are GMT +1. The time now is 02:07 PM.

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