|
請問在此程序執行之前加一行,"你是否確定" 按 Y =執行,按 N =返回,即不執行程式,請看附圖
bear-ricky 发表于 2016-7-7 23:07
Sub save()
With Sheets("紀錄")
R = .Cells(65536, 1).End(xlUp).Row + 1 - Sub save()
- If MsgBox("你是否確定", vbYesNo, "提示") = vbYes Then
- With Sheets("紀錄")
- R = .Cells(65536, 1).End(xlUp).Row + 1
- .Cells(R, 1) = [k7]
- .Cells(R, 2) = [k6]
- .Cells(R, 3) = [b3]
- .Cells(R, 4) = [C10]
- .Cells(R, 5) = [H10]
- .Cells(R, 6) = [I10]
- .Cells(R, 7) = [K23]
- Range("A3").Select
- Selection.ClearContents
- Range("C8:D8").Select
- Selection.ClearContents
- Range("A10:A22").Select
- Selection.ClearContents
- Range("H10:H22").Select
- Selection.ClearContents
- Range("L6").Value2 = Range("L6").Value2 + 1
- Range("A3").Select
- End With
- End If
- End Sub
复制代码
|
|