Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multi-select from drop down list in Excel 97
Hi
I am using the following code to enable multi select from drop down lists in XL2003, but have a group of users requiring this feature in XL97... Public InActivity As Boolean Private Sub Worksheet_Change(ByVal Target As Range) If InActivity Then Exit Sub InActivity = True On Error GoTo NonValidatedCell If Selection.Validation.Type = xlValidateList Then ColAbs = Target.Column If ColAbs < 3 Then GoTo NonValidatedCell RowAbs = Target.Row If Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value = "Delete Contents" Then TotalString = "" Else Application.Undo TotalString = Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value & ", " Application.Undo TotalString = TotalString & Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value End If If Left(TotalString, 1) = "," Then TotalString = Mid(TotalString, 3) Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value = TotalString End If InActivity = False Exit Sub NonValidatedCell: InActivity = False End Sub The spreadsheet opens in XL97 without error but you can only select one item from the list... Selecting a second item just overwrites the first.. Any suggestions?????? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Multi-select from drop down list in Excel 97
There's information here on Excel 97 data validation and worksheet events:
http://www.contextures.com/xlDataVal08.html#Change arpgis wrote: Hi I am using the following code to enable multi select from drop down lists in XL2003, but have a group of users requiring this feature in XL97... Public InActivity As Boolean Private Sub Worksheet_Change(ByVal Target As Range) If InActivity Then Exit Sub InActivity = True On Error GoTo NonValidatedCell If Selection.Validation.Type = xlValidateList Then ColAbs = Target.Column If ColAbs < 3 Then GoTo NonValidatedCell RowAbs = Target.Row If Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value = "Delete Contents" Then TotalString = "" Else Application.Undo TotalString = Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value & ", " Application.Undo TotalString = TotalString & Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value End If If Left(TotalString, 1) = "," Then TotalString = Mid(TotalString, 3) Sheets("Recreation_Activity").Cells(RowAbs, ColAbs).Value = TotalString End If InActivity = False Exit Sub NonValidatedCell: InActivity = False End Sub The spreadsheet opens in XL97 without error but you can only select one item from the list... Selecting a second item just overwrites the first.. Any suggestions?????? -- Debra Dalgleish Contextures http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I select multi values from a list | Excel Discussion (Misc queries) | |||
How to Select multi from drop down (field buttons) | Charts and Charting in Excel | |||
multiple select from the drop down list in excel. list in one sheet and drop down in | Excel Discussion (Misc queries) | |||
List Box Multi Select Option | Excel Worksheet Functions | |||
excel- multi level select from a list in excel? | Setting up and Configuration of Excel |