more than one multiple select pick-list on one worksheet

brandme

New Member
Joined
Feb 23, 2018
Messages
2
How do I get more than one multiple pick-lists to work on the same worksheet?
Not looking for help with related/dependant pick-lists.

I copied some basic vba code for creating a multiple select pick-list and it worked just fine.
But I want to have more than one multiple select pick-list on one worksheet.
example:
column B has a multiple select pick-list of one, two three

column D has a multiple select pick-list of dog, cat, cow

column G has a multiple select pick-list of red, yellow, green

the three pick-lists are not related/dependent on each other.

I thought there would be a way in the code to say, for this column do this, for this column do this...but did not see anything I thought would work

thanks

 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,263
You said:
one multiple pick-lists

Do you mean a data validation list?

I have never heard the term:
multiple pick-lists

Show me the code you have.
 

brandme

New Member
Joined
Feb 23, 2018
Messages
2
VBA code for to more than one multiple selection drop-down list on same worksheet?

I am having trouble trying to have more than one multiple selection drop-down lists on the same worksheet.

The VBA code I have works for ONE multiple selection drop-down list. But I didn't see a way to alter or add code so that I can have more than one multiple selection drop down lists on the same worksheet?

One worksheet I am working on would have at least 5 separate multiple selection drop-down lists on the same worksheet.



Private Sub Worksheet_Change(ByVal Target As Range)


Dim Oldvalue As String
Dim Newvalue As String


On Error GoTo Exitsub
If Target.Column = 12 Then
If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
GoTo Exitsub
Else: If Target.Value = "" Then GoTo Exitsub Else
Application.EnableEvents = False
Newvalue = Target.Value
Application.Undo
Oldvalue = Target.Value
If Oldvalue = "" Then
Target.Value = Newvalue
Else
Target.Value = Oldvalue & ", " & Newvalue
End If
End If
End If
Application.EnableEvents = True
Exitsub:
Application.EnableEvents = True
End Sub
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
31,913
Office Version
365
Platform
Windows
Cross posted https://www.excelforum.com/excel-programming-vba-macros/1221766-vba-code-for-more-than-one-multiple-selection-drop-down-list-on-same-worksheet.html

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 

Forum statistics

Threads
1,081,423
Messages
5,358,595
Members
400,505
Latest member
JacquiT

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top