Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set xWs = Application.ActiveSheet
- On Error Resume Next
- Set xCombox = xWs.OLEObjects("TempCombo")
- With xCombox
- .ListFillRange = ""
- .LinkedCell = ""
- .Visible = False
- End With
- If Target.Validation.Type = 3 Then
- Target.Validation.InCellDropdown = False
- Cancel = True
- xStr = Target.Validation.Formula1
- xStr = Right(xStr, Len(xStr) - 1)
- If xStr = "" Then Exit Sub
- With xCombox
- .Visible = True
- .Left = Target.Left
- .Top = Target.Top
- .Width = Target.Width + 5
- .Height = Target.Height + 5
- .ListFillRange = xStr
- If .ListFillRange = "" Then
- xArr = Split(xStr, ",")
- Me.TempCombo.List = xArr
- End If
- .LinkedCell = Target.Address
- End With
- xCombox.Activate
- Me.TempCombo.DropDown
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement