0
我想解鎖給定範圍內的單元格,如果它們沒有背景顏色的話。如果colorindex = 0,VBA解鎖一個範圍內的單元格
Sub macunlock()
Dim rng1 As Range
Set rng1 = Range("A1:C1")
For Each cell In rng1
If cell.Interior.ColorIndex = 0 Then cell.Locked = False
Next cell
End Sub
但是,指定的單元格不解鎖。
會發生什麼??? – cyboashu