Como evitar que al compartir el libro se quede pegada la lista desplegable
De nuevo a todos, tengo este problema ocurre que cuando protejo y comparto el libro se queda pegado el recuadro de la lista desplegable en blanco, este es el código que ocupo y una imagen de como queda al compartir el libro.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim xCombox As OLEObject
Dim xStr As String
Dim xWs As Worksheet
Set xWs = Application.ActiveSheet
On Error Resume Next
Set xCombox = xWs.OLEObjects("TipoCta")
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 + 1
.Height = Target.Height + 1
.ListFillRange = xStr
.LinkedCell = Target.Address
End With
xCombox.Activate
Me.TipoCta.DropDown
End If
End Sub
Private Sub TipoCta_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 Su
2 respuestas
Respuesta de Abraham Valencia
1
Respuesta de Programar Excel
