snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
Me.ListBox1.Clear
For I = 6 To Application.WorksheetFunction.CountA(Sheets("DatabaseREQSIT").Range("C:C"))
If Sheets("DatabaseREQSIT").Cells(I, 3).Value = Me.ComboBox1.Value Then
Me.ListBox1.AddItem Sheets("DatabaseREQSIT").Cells(I, 6).Value & " || ÃËÑÊ : " & Sheets("DatabaseREQSIT").Cells(I, 5).Value
End If
Next I
อยู่ใน ComboBox1 ครับ
ขั้นตอน
คลืกปุ่ม
2.JPG
เลือกข้อมูลลำดับ 1
0.JPG
แสดงผลดังรูป
1.JPG
ถูกต้อง
รองเลือกลำดับสุดท้าย
ไม่แสดงผลครับ
You do not have the required permissions to view the files attached to this post.
Private Sub ComboBox1_Change()
If ComboBox1 <> "" Then
CommandButton1.Enabled = True
Else
CommandButton1.Enabled = False
End If
Sheets("DatabaseREQSIT").Select
Me.ListBox1.Clear
For i = 6 To Application.WorksheetFunction.CountA(Sheet8.Range("A:A"))
If Sheet8.Cells(i, 3).Value = Me.ComboBox1.Value Then
Me.ListBox1.AddItem Cells(i, 6).Value & " || รหัส : " & Cells(i, 5).Value
End If
Next i
End Sub
You do not have the required permissions to view the files attached to this post.
Private Sub ComboBox1_Change()
If ComboBox1 <> "" Then
CommandButton1.Enabled = True
Else
CommandButton1.Enabled = False
End If
irow = Worksheets("DatabaseREQSIT").Range("A" & Rows.Count).End(xlUp).Row
Sheets("DatabaseREQSIT").Select
Me.ListBox1.Clear
For i = 6 To (irow)
If Sheet8.Cells(i, 3).Value = Me.ComboBox1.Value Then
Me.ListBox1.AddItem Cells(i, 6).Value & " || ÃËÑÊ : " & Cells(i, 5).Value
End If
Next i
End Sub