Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default Decreasing Validation List - Excel 2003

Okay...I have a validation list set up to select names from a named range on
a different sheet. No problem there. What Id like to do it is reduce the
selection of names from the list once a selection has been made; but only for
a selected column!! For example, if the list is of names and it has Tom,
Rob, and Fred in it, if the user selects Rob from the list, and if the list
is accessed again in the same column, Rob does not appear as an option to
select again. Alright.....I have a VB code that will automatically remove
the selected item from the drop-down validation list once it has been
selected once. However, the particular code Im using only allows each name
in the range to be used only once anywhere that the list is called. If
actually removes the selected reference from the original named list
permanently! This is my problem; I do not want the original named list
deleted. I want the validation list of choices to reduce. The reason is
that I want to use the named list in other places, with additional validation
lists (again to select from the original list). I could simply make x-number
of hidden copies of my original named list but that seems counterproductive.
Is there a way to modify the VB code that it just temporarily reduces the
visible selections until a new column is selected?

I have uploaded a copy of a sample file from which am working
(http://campus.pc.edu/~rarts/validation_test.xls). Basically, on the results
page, Id like to be able to select names from my list for a particular
column (Event #), switch columns (Events) and be able to pick from my
original list again until used up for that column, and etcetera....can anyone
help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Decreasing Validation List - Excel 2003

My suggestion would be to modify the selection list and build an array in
memory of the items that were "pulled". THen when the user changes columns,
rebuild the selection list "on the fly". You would need to use this function
to do this:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)

End Sub
which you would place in the "ThisWorkbook" area in VBA. You would need to
record what column you are in when you load the spreadsheet so you can then
be able to identify when the column changes. This doesn't sound too
difficult to me, but if you need help doing this let me know.

You would need to create a public variable to record the column using the
Private Sub Workbook_Activate()

End Sub
sub that would be placed in the same area. Then in the Change sub
(displayed above), have code that would change the data in the selection
range. Good luck!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default Decreasing Validation List - Excel 2003

Thanks Mike...I'll give it a shot!

Robert.


"Mike H." wrote:

My suggestion would be to modify the selection list and build an array in
memory of the items that were "pulled". THen when the user changes columns,
rebuild the selection list "on the fly". You would need to use this function
to do this:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)

End Sub
which you would place in the "ThisWorkbook" area in VBA. You would need to
record what column you are in when you load the spreadsheet so you can then
be able to identify when the column changes. This doesn't sound too
difficult to me, but if you need help doing this let me know.

You would need to create a public variable to record the column using the
Private Sub Workbook_Activate()

End Sub
sub that would be placed in the same area. Then in the Change sub
(displayed above), have code that would change the data in the selection
range. Good luck!

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
Excel 2003. Data/Validation/Settings - Allow/List: sizing list? Bart Excel Discussion (Misc queries) 1 February 20th 09 01:40 PM
Excel 2003-Data Validation drop down list not working? Balcott Excel Worksheet Functions 1 September 25th 08 07:42 PM
data validation when list is on a different worksheet? 2003 joromajr Excel Discussion (Misc queries) 1 July 31st 08 08:56 AM
Make Validation List Wider - Excel 2003 cmarion Excel Discussion (Misc queries) 4 June 18th 08 09:08 PM
Decreasing number of Values in Pivot Tables Value List Rohan Excel Discussion (Misc queries) 0 May 21st 07 09:45 AM


All times are GMT +1. The time now is 02:12 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"