susan 发表于 2014-2-12 17:34:35

双击指定单元,循环录入文本(工作表代码)

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

谈笑锋声 发表于 2017-12-28 08:23:17

先收藏   研究研究
页: [1]
查看完整版本: 双击指定单元,循环录入文本(工作表代码)