======================================
C5儲存格 版大可手動輸入1 或 0 或 -1
會在A6-C6儲存格顯示數字(也就是我要的狀態或燈號)
Sub Macro1()
'' Macro1 Macro
Range("A6").Select
ActiveCell.FormulaR1C1 = "1"
Range("B6").Select
Selection.ClearContents
End Sub
Sub Macro2()
' Macro2 Macro
Range("B6").Select
ActiveCell.FormulaR1C1 = "0"
Range("A6").Select
Selection.ClearContents
Range("C6").Select
Selection.ClearContents
End Sub
Sub Macro3()
' Macro3 Macro
Range("C6").Select
ActiveCell.FormulaR1C1 = "-1"
Range("B6").Select
Selection.ClearContents
End Sub作者: bqwangs 時間: 2014-1-30 10:53