Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
Por walber
Posts
#18966
Boa tarde

quando clico na linha G16 Planilha 01(MENU)
mostra os itens que tem na Planilha 02(BD_Produtos) na coluna 2


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
Avatar do usuário
Por Mikel
Posts Avatar
#18969
Walber (Sossego) , boa noite.

Resposta dada no fórum do Tómas Vásquez.

Excelente final de semana.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord