Excel vba 시트 모듈에 프로그래밍 방식으로 코드 추가 프로그래밍 방식으로 생성된 워크북에 아래와 유사한 이벤트 코드를 넣는 방법: Private Sub Worksheet_Change(ByVal Target As Range) Dim nextTarget As Range Set nextTarget = Range(Selection.Address) 'store the next range the user selects Target.Columns.Select 'autofit requires columns to be selected Target.Columns.AutoFit nextTarget.Select End Sub 이를 통해 워크북을 추가하고 워크시트 변경 이벤트를 시트 1 모듈에 배치합니다. Sub Add..