- 帖子
- 15
- 主題
- 9
- 精華
- 0
- 積分
- 54
- 點名
- 0
- 作業系統
- windows 7
- 軟體版本
- 2010
- 閱讀權限
- 20
- 註冊時間
- 2015-2-13
- 最後登錄
- 2024-3-1
|
請問要如何把下面這兩段程式碼加再一起
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 |
|