Board logo

標題: [發問] 請問要如何把兩段加再一起 [打印本頁]

作者: john711101    時間: 2015-3-4 09:19     標題: 請問要如何把兩段加再一起

請問要如何把下面這兩段程式碼加再一起

BOBend = Sheets("BOB").Columns("L").Find("*", , , , , xlPrevious).Row
Sheets("BOB").Cells(BOBend + 1, "B") = TB1.Value
Sheets("BOB").Cells(BOBend + 1, "H") = TB2.Value
Sheets("BOB").Cells(BOBend + 1, "L") = TB3.Value
Sheets("BOB").Cells(BOBend + 1, "N") = TB4.Value
ActiveCell.Offset(1, 0).Select

TB1.Value = ""
TB2.Value = ""
TB3.Value = ""
TB4.Value = ""
CoB2_1.BackColor = &H8000000F
CoB2_2.BackColor = &H8000000F
CoB2_3.BackColor = &H8000000F
CoB2_4.BackColor = &H8000000F
CoB2_1.ForeColor = &H80000012
CoB2_2.ForeColor = &H80000012
CoB2_3.ForeColor = &H80000012
CoB2_4.ForeColor = &H80000012

--------------------分隔線-------------------------------

Private Sub Cm1_Click()
Dim BOBend As Integer
If TB1.Value = "" Then
  MsgBox ("條碼沒刷!!")
Else
  If TB2.Value = "" Then
  MsgBox ("條碼!忘了刷?")
  Else
    If TB3.Value = "" Then
    MsgBox ("哪位?")
   Else
    If TB4.Value = "" Then
      MsgBox ("你忘了按!")

   End If
   End If
  End If
End If




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)