Boa tarde.
Com duplo clique ela funciona normalmente conforme abaixo, mas quero trocar por uma tecla como F12 ou BREAK por exemplo. Ai que não está funcionando.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
' ActiveSheet.Unprotect "xxxx"
Sheets("Produtos").Unprotect Password:="xxxx"
If Target.Column = 3 Then UserForm1.Show
If Target.Column = 5 Then UserForm2.Show
If Target.Column = 1 Then UserForm3.Show
' ActiveSheet.Protect "xxxxx"
Sheets("Produtos").Protect Password:="xxxx"
End Sub
Boa tarde. ESte é o codigo do userform1 ou 2, etc......
Private Sub ListBox1_Click()
ActiveCell.Value = ListBox1.Value
Unload Me
End Sub
Private Sub TextBox1_Change()
TextoDigitado = TextBox1.Text
Call PreencheLista
End Sub
Private Sub UserForm_Initialize()
Call PreencheLista
End Sub
Private Sub PreencheLista()
Dim ws As Worksheet
Dim i As Integer
Dim TextoCelula As String
Set ws = ThisWorkbook.Sheets("Cadastros")
i = 9
ListBox1.Clear
With ws
While .Cells(i, 9).Value <> Empty
TextoCelula = .Cells(i, 9).Value
If UCase(Left(TextoCelula, Len(TextoDigitado))) = UCase(TextoDigitado) Then
ListBox1.AddItem .Cells(i, 9)
End If
i = i + 1
Wend
End With
End Sub