티스토리 뷰

반응형


Sub 삭제_전체시트()

  rt = MsgBox("전체 시트를 삭제 하시겠습니까?", vbYesNo)

    If rt = vbNo Then

      Application.Cursor = xlDefault

      Application.ScreenUpdating = True

      Application.Calculation = xlCalculationAutomatic

    Exit Sub

  End If

  

  b = Application.DisplayAlerts

  Application.DisplayAlerts = False

  ' 합수 시트 생성

  Dim s As Variant

  

  For Each s In Sheets

      If Left(s.Name, 1) <> "#" Then

        s.Delete

      End If

  Next s

  Application.DisplayAlerts = b

End Sub


Sub 삭제_업체시트()

  rt = MsgBox("업체 시트를 삭제 하시겠습니까?", vbYesNo)

    If rt = vbNo Then

      Application.Cursor = xlDefault

      Application.ScreenUpdating = True

      Application.Calculation = xlCalculationAutomatic

    Exit Sub

  End If

  

  b = Application.DisplayAlerts

  Application.DisplayAlerts = False

  ' 합수 시트 생성

  Dim s As Variant

  

  For Each s In Sheets

      If Left(s.Name, 1) = "%" Then

        s.Delete

      End If

  Next s

  Application.DisplayAlerts = b

End Sub


Sub 삭제_담당시트()

  rt = MsgBox("담당 시트를 삭제 하시겠습니까?", vbYesNo)

    If rt = vbNo Then

      Application.Cursor = xlDefault

      Application.ScreenUpdating = True

      Application.Calculation = xlCalculationAutomatic

    Exit Sub

  End If

  

  b = Application.DisplayAlerts

  Application.DisplayAlerts = False

  ' 합수 시트 생성

  Dim s As Variant

  

  For Each s In Sheets

      If Left(s.Name, 1) = "&" Then

        s.Delete

      End If

  Next s

  Application.DisplayAlerts = b

End Sub


Sub 삭제_품목시트()

  rt = MsgBox("품목 시트를 삭제 하시겠습니까?", vbYesNo)

    If rt = vbNo Then

      Application.Cursor = xlDefault

      Application.ScreenUpdating = True

      Application.Calculation = xlCalculationAutomatic

    Exit Sub

  End If

  

  b = Application.DisplayAlerts

  Application.DisplayAlerts = False

  ' 합수 시트 생성

  Dim s As Variant

  

  For Each s In Sheets

      If Left(s.Name, 1) = "@" Then

        s.Delete

      End If

  Next s

  Application.DisplayAlerts = b

End Sub



Sub 삭제_입출고시트()

  rt = MsgBox("입출고 시트를 삭제 하시겠습니까?", vbYesNo)

    If rt = vbNo Then

      Application.Cursor = xlDefault

      Application.ScreenUpdating = True

      Application.Calculation = xlCalculationAutomatic

    Exit Sub

  End If

  

  b = Application.DisplayAlerts

  Application.DisplayAlerts = False

  ' 합수 시트 생성

  Dim s As Variant

  

  For Each s In Sheets

      If Left(s.Name, 1) = "^" Then

        s.Delete

      End If

  Next s

  Application.DisplayAlerts = b

End Sub






반응형
댓글