|
▼aby200sm さん:
VBAでやってみました。
方言がキツくて読みずらいかもしれませんが、
参考になればうれしいです。
リセット用に CommandButton をシート上に配置してください
Private Enum enmTickStatus
enmTickStatus_Blank = 0
enmTickStatus_Nothing = 1
enmTickStatus_Wait = 2
enmTickStatus_Close = 3
End Enum
Private Const conSTR_ChkAddr As String = "B2"
Private Const conSTR_DispAddr As String = "B3"
Private Const conSTR_Blank As String = "空白"
Private Const conSTR_Nothing As String = "無し"
Private Const conSTR_Wait As String = "待ち"
Private Const conSTR_Close As String = "終了"
Private gbClose As Boolean
Private Sub CommandButton1_Click()
Call TickReset
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If gbClose Then Exit Sub
If Target.Address <> Range(conSTR_ChkAddr).Address Then Exit Sub
With Range(conSTR_DispAddr)
Select Case Target.Value
Case enmTickStatus_Blank
.Value = conSTR_Blank
Case enmTickStatus_Nothing
.Value = conSTR_Nothing
Case enmTickStatus_Wait
.Value = conSTR_Wait
Case enmTickStatus_Close
gbClose = True
.Value = conSTR_Close
Case Else
.Value = vbNullString
End Select
End With
End Sub
Private Sub TickReset()
gbClose = False
Range(conSTR_DispAddr).Value = vbNullString
End Sub
|
|