Private Sub Worksheet_BeforeDoubleClick(ByVal T As Range, Cancel As Boolean)
If T.Address <> "$A$1" Then Exit Sub
Cancel = True
T = IIf(T = "好", "中", IIf(T = "中", "差", "好"))
End Sub
双击指定单元,循环录入文本(工作表代码)
Dim nums As Byte
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$A$1" Then
nums = nums Mod 3 + 1
Target = Mid("上中下", nums, 1)
Target.Offset(1, 0).Select
End If
End Sub
|
|
susan