snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
'Other code
If cbbName1 <> "" Then
If TextBoxSum1 = "" Or TextBoxDeli1 = "" Then
MsgBox "กรอกข้อมูลไม่ครบ"
Exit Sub
End If
End If
If cbbName2 <> "" Then
If TextBoxSum2 = "" Or TextBoxDeli2 = "" Then
MsgBox "กรอกข้อมูลไม่ครบ"
Exit Sub
End If
End If
'...
'Other code
'Other code
If cbbName1 <> "" Then
If TextBoxSum1 = "" Or TextBoxDeli1 = "" Then
MsgBox "กรอกข้อมูลไม่ครบ"
Exit Sub
End If
End If
If cbbName2 <> "" Then
If TextBoxSum2 = "" Or TextBoxDeli2 = "" Then
MsgBox "กรอกข้อมูลไม่ครบ"
Exit Sub
End If
End If
'...
'Other code
'Other code
If cbbName1 <> "" Then
If TextBoxSum1 = "" Or TextBoxDeli1 = "" Then
MsgBox "กรอกข้อมูลไม่ครบ"
Exit Sub
End If
End If
If cbbName2 <> "" Then
If TextBoxSum2 = "" Or TextBoxDeli2 = "" Then
MsgBox "กรอกข้อมูลไม่ครบ"
Exit Sub
End If
End If
'...
'Other code
Private Sub CommandButton1_Click()
Dim c As New Collection
Dim ct As Control
Sheet1.Activate
Cells(13, 5).Value = "รายละเอียด"
Cells(13, 6).Value = "จำนวน"
Cells(13, 7).Value = "ราคา"
On Error Resume Next
For Each ct In InputOrderItem.Controls
If VBA.Left(ct.Name, 3) = "cbb" Then
c.Add ct.Text, ct.Text
End If
Next ct
If c.Count < 5 Then
MsgBox "ซ้ำ"
End If
'Other code
End Sub