Sub
UnbenötigteModulregisterAusblenden()
Dim
strErgebnis
As
String
, ZeileTitelErgebnis
As
Long
Dim
wks
As
Worksheet, rngSuchbereich
As
Range
Dim
SP
As
Integer
, CNT
As
Integer
, LR
As
Double
, Z
SP = 2
Dim
PriceSet
As
Boolean
PriceSet =
False
ActiveWorkbook.Unprotect Password:=
"pass"
For
Each
wks
In
ActiveWorkbook.Worksheets
Select
Case
wks.Name
Case
strErgebnis,
"Offerte"
Case
strErgebnis,
"Gesamtkosten"
Case
Else
ActiveSheet.Unprotect Password:=
"pass"
For
Each
Z
In
Columns(SP).SpecialCells(xlCellTypeConstants, 1)
Select
Case
Z
Case
0,
"0"
Case
Else
PriceSet =
True
End
Select
Next
ActiveSheet.Protect Password:=
"pass"
If
PriceSet =
False
Then
ActiveSheet.Visible =
False
PriceSet =
False
End
If
End
Select
Next
Sheets(
"Staffelpreisberechnung"
).Visible =
False
Sheets(
"PreisvergleichMitbewerber"
).Visible =
False
ActiveWorkbook.Protect Password:=
"pass"
End
Sub