【发布时间】:2020-01-03 19:10:36
【问题描述】:
如何实现此代码以处理工作簿中的所有工作表。`
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
If Not Intersect(Target, Me.Range("A2:A100")) Is Nothing Then
Select Case Target.Interior.ColorIndex
Case xlNone, 4: Target.Interior.ColorIndex = 45
Case 45: Target.Interior.ColorIndex = 0
Case Else: Target.Interior.ColorIndex = xlNone
End Select
End If
End Sub
`
【问题讨论】:
-
这个问题有类似的前提:stackoverflow.com/questions/33340448/…
标签: excel vba colors double-click