Bonjour
Je voudrais adapter ce code lorsque je clique sur la ligne G16 Feuille 01 (MENU)
Il montre les éléments qui ont la grille 02 (BD_Produtos) dans la colonne 2
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 Option Explicit Private TextoDigitado As String 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.Worksheets(2) i = 1 ListBox1.Clear With ws While .Cells(i, 2).Value <> Empty TextoCelula = .Cells(i, 1).Value If UCase(Left(TextoCelula, Len(TextoDigitado))) = UCase(TextoDigitado) Then ListBox1.AddItem .Cells(i, 1) End If i = i + 1 Wend End With End Sub