wie richte ich es ein, daß in einem WB keines der darin
enthaltenen WS ausgedruckt werden kann?
Die Recherche hat mir nicht weiter geholfen.
Für Eure Tips im voraus besten Dank.
Gruß
Torsten
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Tabelle1" Then
MsgBox "Das Durcken ist nicht erlaubt!"
Cancel = True
End If
Exit Sub
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim newDAO As New DataObject 'Verweis auf die Microsoft Forms 2.0 Object Library notwendig
Application.CutCopyMode = False
newDAO.SetText ""
newDAO.PutInClipboard
Set newDAO = Nothing
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim ws As Worksheet
Me.Unprotect "test"
For Each ws In Me.Sheets
If ws.CodeName <> "Tabelle1" Then ws.Visible = xlSheetVeryHidden
Next
Me.Save
End Sub
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
End Sub
Private Sub Workbook_Open()
Dim ws As Worksheet
With Application
.Interactive = False
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableCancelKey = xlDisabled
End With
If Me.ProtectWindows = True Or Me.ProtectStructure = True Then _
Me.Unprotect "test"
Me.Windows(1).WindowState = xlMaximized
For Each ws In Me.Sheets
If ws.ProtectContents = True Then _
ws.Unprotect "test"
ws.Visible = xlSheetVisible
ws.EnableSelection = xlNoSelection
ws.Protect "test"
Next
Me.Protect "test", True, True
With Application
.EnableCancelKey = xlInterrupt
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
.Interactive = True
End With
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim ws As Worksheet
Me.Unprotect "test"
For Each ws In Me.Sheets
If ws.CodeName <> "Tabelle1" Then ws.Visible = xlSheetVeryHidden
Next
Me.Save
End Sub
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Cancel = True
End Sub
Private Sub Workbook_Open()
Dim ws As Worksheet
With Application
.Interactive = False
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableCancelKey = xlDisabled
End With
If Me.ProtectWindows = True Or Me.ProtectStructure = True Then _
Me.Unprotect "test"
Me.Windows(1).WindowState = xlMaximized
For Each ws In Me.Sheets
If ws.ProtectContents = True Then _
ws.Unprotect "test"
ws.Visible = xlSheetVisible
ws.EnableSelection = xlNoSelection
ws.Protect "test"
Next
Me.Protect "test", True, True
With Application
.EnableCancelKey = xlInterrupt
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
.Interactive = True
End With
End Sub