반응형

With문은 같은 내용을 하나로 묶는 기증이다.

 

Width ~ End Width 

 

아래 코드에서 .Colorindex 앞에는 Target.Interior이 생략된 것이라고 보면 된다.

  

   With Target.Interior
        If .ColorIndex = 3 Then
            .ColorIndex = 0
        Else
            .ColorIndex = 3
        End If
    End With

 

 

 

 

반응형

'VBA' 카테고리의 다른 글

엑사남_13강 DoubleClick 이벤트  (0) 2022.03.05
범위를 변수로 지정하는 방법  (0) 2022.03.01
UserForm  (0) 2022.02.23
Open Close evnet 만들기  (0) 2022.02.23
Clear, ClearContents, Delete  (0) 2022.02.22

+ Recent posts