Home

Combining Codes For Work Project

Tubatrombonekid
Occasional Visitor

I'm kind of new at using VBA codes. I have a worksheet that so far zooms in to see the drop down list. Now I'm trying to have the VBA have a way to be able to multi select from the drop down list.

Here is the code that I am using.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'updateby Extendoffice 20160530
On Error GoTo LZoom
Dim xZoom As Long
xZoom = 50
If Target.Validation.Type = xlValidateList Then xZoom = 80
LZoom:
ActiveWindow.Zoom = xZoom
End Sub
Private Sub Worksheets_Change(ByVal Target As Range)
Dim rngDV As Range
Dim oldVal As String
Dim newVal As String
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
newVal = Target.Value
Application.Undo
oldVal = Target.Value
Target.Value = newVal
If Target.Column = 3 Or True Then
If oldVal = "" Then
'do nothing
Else
If newVal = "" Then
'do nothing
Else
Target.Value = oldVal _
& ", " & newVal


End If
End If
End If
End If


exitHandler:
Application.EnableEvents = True


End Sub

How can I combine this to have it do what I want. I have done a lot of research and tried different things and I am stuck.

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies