Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Ws As Worksheet
Dim ComboX As OLEObject
Dim StrX As String
On Error Resume Next
Set Ws = Application.ActiveSheet
Set ComboX = Ws.OLEObjects("CCTemp")
With ComboX 'Oculta el Combo ActiveX
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
End With
If Target.Validation.Type = 3 Then 'Si Validación es tipo Lista
Target.Validation.InCellDropdown = False
Cancel = True
StrX = Target.Validation.Formula1
StrX = Right(StrX, Len(StrX) - 1) 'quita el signo =
If StrX = "" Then Exit Sub
With ComboX
.Visible = True
.Left = Target.Left
.Top = Target.Top
.Width = Target.Width + 4
.Height = Target.Height + 4
.LinkedCell = Target.Address
'----------AQUI FALLA-----------
ListFillRange = StrX
'--------------------------------
End With
ComboX.Activate
Me.CCTemp.DropDown
End If
End Sub
Private Sub CCTemp_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case KeyCode
Case 9
Application.ActiveCell.Offset(0, 1).Activate
Case 13
Application.ActiveCell.Offset(1, 0).Activate
End Select
End Sub