Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default 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
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
how do I select multi values from a list Tommy Excel Discussion (Misc queries) 1 July 12th 06 09:38 AM
How to Select multi from drop down (field buttons) Bettergains Charts and Charting in Excel 0 November 24th 05 01:55 AM
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Excel Discussion (Misc queries) 5 October 27th 05 06:55 PM
List Box Multi Select Option ann_nyc Excel Worksheet Functions 0 October 11th 05 05:56 PM
excel- multi level select from a list in excel? hide Setting up and Configuration of Excel 1 May 20th 05 09:01 PM


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