Sub
UnbenötigteModulregisterAusblenden()
Const
passwort =
""
Dim
strErgebnis
As
String
, ZeileTitelErgebnis
As
Long
Dim
wks
As
Worksheet, rngSuchbereich
As
Range
Dim
SP
As
Integer
, CNT
As
Integer
, LR
As
Double
, Zeile
SP = 2
Dim
PriceSet
As
Boolean
PriceSet =
False
ActiveWorkbook.Unprotect Password:=passwort
For
Each
wks
In
ActiveWorkbook.Worksheets
With
wks
Select
Case
.Name
Case
"Offerte"
Case
"Gesamtkosten"
Case
Else
.Unprotect Password:=passwort
For
Zeile = 1
To
WorksheetFunction.Max(2, .Cells(Rows.Count, SP).
End
(xlUp).Row)
If
IsNumeric(.Cells(Zeile, SP))
And
.Cells(Zeile, SP).Value <> 0
Then
PriceSet =
True
Exit
For
End
If
Next
Zeile
.Protect Password:=passwort
If
PriceSet =
False
Then
.Visible =
False
PriceSet =
False
End
If
End
Select
End
With
Next
Sheets(
"Staffelpreisberechnung"
).Visible =
False
Sheets(
"PreisvergleichMitbewerber"
).Visible =
False
ActiveWorkbook.Protect Password:=passwort
End
Sub