Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经搜索谷歌一段时间了,我似乎无法找到我的答案。
我有一个显示“服务中”的单元格,一旦您单击它,使用 VBA,我希望它更改为“未服务中”,如果您再次单击它,它将返回到“服务中”。你会怎么做呢?
谢谢你的时间:D
这会起作用:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Value = "In service" Then Target = "Out of service" ElseIf Target.Value = "Out of service" Then Target = "In service" End If End Sub