본문 바로가기

Engineer LARRY/3) 현장업무-공무

자주 쓰는 VBA(Visual Basic Aplication) 코딩

반응형

이름관리자 삭제방법



Option Explicit

Sub show_name()
Dim n As Name
For Each n In ThisWorkbook.Names
n.Visible = True
Next n

End Sub


스타일 삭제방법


Sub style_delete()

Dim cell_style As Style
Dim i As Integer

On Error Resume Next
For Each cell_style In ThisWorkbook.Styles
If Not cell_style.BuiltIn Then cell_style.Delete
i = i + 1
Next

MsgBox i & "개의 셀 스타일을 삭제했습니다."


End Sub


반응형