marreco
Member
Hi.
how save data in TexBox1 into sheet("Plan1"), based seletec row in listBox?
how save data in TexBox1 into sheet("Plan1"), based seletec row in listBox?
Code:
Private Sub CommandButton1_Click()
'how save data in TexBox1 into sheet("Plan1"), based seletec row in listBox?
End Sub
Private Sub ListBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With ListBox2
If .ListIndex > -1 Then
UserForm1.TextBox1.Text = .List(.ListIndex, 3)
End If
End With
End Sub
Private Sub UserForm_Initialize()
With ListBox1
.List = Sheets("Plan1").Cells(1, 1).CurrentRegion.Value
.ColumnCount = Sheets("Plan1").Cells(1, 1).CurrentRegion.Columns.Count
.ColumnWidths = "40;50;50;50"
End With
With ListBox2
.List = Sheets("Plan2").Cells(1, 1).CurrentRegion.Value
.ColumnCount = Sheets("Plan2").Cells(1, 1).CurrentRegion.Columns.Count
.ColumnWidths = "50;40;50;50"
End With
End Sub