Sub Worksheet_SelectionChange(ByVal ws As Range)
Dim rInt As Range
Dim rCell As Range
Set rInt = Intersect(Target, Range("B1:B32, B37:B45, K3:K11, K12:K18"))
If Not rInt Is Nothing Then
For Each rCell In rInt
rCell.Value = "1"
Next
End If
Set rInt = Nothing
Set rCell = Nothing
End Sub
最佳答案
关于vba - 我正在尝试在所有工作表中运行此代码,除了工作簿中的一个,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39165773/