回復 3#chi830
'剛剛才發現 [E3],[E5] 是公式, 請刪除
'又原來我的想法有點問題(請更正)
'又原來的數字是10萬,不是百萬(已更正)
'下列兩者並存 (SelectionChange 及 Change)請全部貼上
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$3" And [D3] >= 1000000 Then
MsgBox "[D3]的金額超過1百萬,請依核決權限上呈董事長核准"
Exit Sub
End If
If Target.Address = "$D$5" And [D5] >= 1000000 Then
MsgBox "[D5]的金額超過1百萬,請依核決權限上呈董事長核准"
Exit Sub
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$3" And [D3] >= 1000000 Then
MsgBox "[D3]的金額超過1百萬,請依核決權限上呈董事長核准"
Exit Sub
End If
If Target.Address = "$D$5" And [D5] >= 1000000 Then
MsgBox "[D5]的金額超過1百萬,請依核決權限上呈董事長核准"
Exit Sub
End If
End Sub