LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Data Val MultiSelect ?

In my quest to find examples of how to select Multiple values from drop down
list, I found this code from "Contextures" website on how to do this in Excel
spreadsheet. However, I am using a Userform and want to know how do I
incorporate this into a Userform? Can someone please help me with this? I
am new to Excel code and I apologize for my lack of knowledge. Thank you in
advance for any help you can provide.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo exitHandler

Dim rngDV As Range
If Target.Count 1 Then GoTo exitHandler

On Error Resume Next
Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation)
On Error GoTo exitHandler
If rngDV Is Nothing Then GoTo exitHandler
If Intersect(Target, rngDV) Is Nothing Then
'do nothing
Else
Application.EnableEvents = False
If Target.Column = 3 Then
If Target.Value = "" Then GoTo exitHandler
If Target.Offset(0, 1).Value = "" Then
Target.Offset(0, 1).Value = Target.Value
Else
Target.Offset(0, 1).Value = _
Target.Offset(0, 1).Value _
& ", " & Target.Value
End If
End If
End If

exitHandler:
Application.EnableEvents = True

End Sub

 
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
MultiSelect Listbox StevenD72 Excel Programming 1 September 9th 08 06:43 AM
MultiSelect Popup !<nuc!<|3h3@d Excel Programming 1 January 6th 06 06:43 PM
List Box - MultiSelect Bill[_28_] Excel Programming 2 January 31st 05 10:31 PM
MultiSelect ListBox StephanieH Excel Programming 5 November 20th 04 12:29 AM
Multiselect Listbox Francis Ang[_3_] Excel Programming 2 October 25th 04 01:57 AM


All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"