سلام کدی برای جستجو دارم اما در یک ستون در لیست باکس می اید من میخواهم در یک ردیف بیاید.
ضمنا اگر بر اساس دو خانه بخواهیم جستجو کنیم(دو تکس باکس) مثلا بر اساس سال تولد وشماره شناسنامه انوقت چطوری کد بنویسیم .ممنون
کد PHP:
Dim c
ListBox1.Clear
For Each c In Sheet10.Range("A1:A100")
If c = TextBox66.Text Then
ListBox1.AddItem c
ListBox1.AddItem c.Offset(0, 1)
ListBox1.AddItem c.Offset(0, 2)
ListBox1.AddItem c.Offset(0, 3)
ListBox1.List(ListBox1.ListCount - 1, 1) = c.Offset(0, 1).Value
ListBox1.List(ListBox1.ListCount - 1, 2) = c.Offset(0, 2).Value
ListBox1.List(ListBox1.ListCount - 1, 3) = c.Offset(0, 3).Value
End If
کامنت