- 10 Ago 2021 às 13:46
#66247
Bom dia, gostaria de saber como faço para ativar o combobox pelo vba, ja fiz ele aparecer e desaparecer somente quando uma celula X for celecionada, mas agora preciso que ele fique ativo (ja pronto para escrever algo) toda vez q essa celula X for celecionada.
alguem sabe o comando para torna-lo ativo? segue o comando:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("y63")) Is Nothing Then
ActiveSheet.ComboBox1.Enabled = True
ActiveSheet.ComboBox1.Visible = True
Else
ActiveSheet.ComboBox1.Enabled = False
ActiveSheet.ComboBox1.Visible = False
End If
End If
End Sub
Sub sumir()
ActiveSheet.ComboBox1.Enabled = True
ActiveSheet.ComboBox1.Visible = True
End Sub
alguem sabe o comando para torna-lo ativo? segue o comando:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("y63")) Is Nothing Then
ActiveSheet.ComboBox1.Enabled = True
ActiveSheet.ComboBox1.Visible = True
Else
ActiveSheet.ComboBox1.Enabled = False
ActiveSheet.ComboBox1.Visible = False
End If
End If
End Sub
Sub sumir()
ActiveSheet.ComboBox1.Enabled = True
ActiveSheet.ComboBox1.Visible = True
End Sub