Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Address
Case "$A$1": A1 = Target.Value
Case "$B$1": B1 = Target.Value
End Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$A$1": Range("A2") = A1 - Target.Value
Case "$B$1": Range("B2") = B1 - Target.Value
End Select
End Sub作者: GBKEE 時間: 2015-1-28 16:37