excel - ActiveSheet vs. WorkSheet - Stack Overflow Dim ws As Worksheet Set ws = ActiveSheet Dim chk As Object With ws Set chk = .Shapes ("CheckBox12").OLEFormat.Object If chk.Value = xlOn Then .Range ("CK1").EntireColumn.Hidden = False Else .Range ("CK1").EntireColumn.Hidden = True End If End With This may remove the ws variable from the equation.