อาจารย์ช่วยทดสอบไฟล์ด้วยครับ
Posted: Fri Sep 16, 2011 3:48 pm
เรียนอาจารย์ครับ ไฟล์ที่ได้ทดลองทำไม่ติดปัญหาใดๆ จึงแนบไฟล์ให้อาจารย์ช่วยเทียบดู
ไฟล์นี้ OK
ไฟล์ที่ใช้ไม่ได้กำลังตามา
ไฟล์นี้ OK
ไฟล์ที่ใช้ไม่ได้กำลังตามา
คลังคำตอบแห่งความรู้จากคนไทย เพื่อโลกที่ต้องการเข้าใจในสิ่งเล็ก ๆ อย่างลึกซึ้ง
https://snasui.com/
Code: Select all
Private Sub CobBox16_Change()
Dim i As Integer
If CobBox21.ListCount > 1 Then
For i = CobBox21.ListCount To 1 Step -1
CobBox21.RemoveItem i - 1
Next i
End If
CobBox21.Text = ""
Sheets("ข้อมูลบุลคล").Select ' Add this code
Range("K6").Select
If CobBox16 = "" Then Exit Sub
Do While Not IsEmpty(ActiveCell.Value)
If CDate(ActiveCell.Value) >= CDate(CobBox15.Text) And _
CDate(ActiveCell.Value) <= CDate(CobBox16.Text) Then
CobBox21.AddItem ActiveCell.Value
End If
ActiveCell.Offset(1, 0).Select
Loop
Sheets("cal_1").Select
Range("B13") = CDate(CobBox15)
Range("B14") = CDate(CobBox16)
End Sub
Code: Select all
Sheets("ข้อมูลบุลคล").Select