REGISTRO BY ListBoX (RESOLVIDO)
Enviado: Ter Abr 23, 2019 4:07 pm
Preciso que ao iniciar o formulário as informações da "Plan1" já apareça no meu listbox3, porem as informações da coluna B não esta aparecendo ao iniciar o formulário, só da coluna A, sabem ma ajudar ??
Private Sub UserForm_Initialize()
Dim linhaFinal, linha, x As Integer
ListBox3.Clear
linhaFinal = Plan1.Cells(Rows.Count, 1).End(xlUp).Row
x = 0
For linha = 2 To linhaFinal
ListBox3.AddItem Plan1.Cells(linha, 1).Value
ListBox3.List(x, 1) = Plan1.Cells(linha, 2).Value
x = x + 1
Next
End Sub
Private Sub UserForm_Initialize()
Dim linhaFinal, linha, x As Integer
ListBox3.Clear
linhaFinal = Plan1.Cells(Rows.Count, 1).End(xlUp).Row
x = 0
For linha = 2 To linhaFinal
ListBox3.AddItem Plan1.Cells(linha, 1).Value
ListBox3.List(x, 1) = Plan1.Cells(linha, 2).Value
x = x + 1
Next
End Sub