Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws As Worksheet, Name As String, iName As Integer, vShow, iShow As Integer
If Not Intersect(Range("A1"), Target) Is Nothing Then
vShow = Range("A1").Value
If Not IsEmpty(vShow) And IsNumeric(vShow) Then
iShow = Val(vShow)
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
With ws
Name = Replace(.Name, "List", "")
If Name <> "Master" And IsNumeric(Name) Then
iName = Val(Name)
If iName <= iShow Then .Visible = xlSheetVisible Else .Visible = xlSheetHidden
End If
End With
Next ws
Application.ScreenUpdating = True
End If
End If
End Sub
Dim ws As Worksheet, Name As String, iName As Integer, vShow, iShow As Integer
If Not Intersect(Range("A1"), Target) Is Nothing Then
vShow = Range("A1").Value
If Not IsEmpty(vShow) And IsNumeric(vShow) Then
iShow = Val(vShow)
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Worksheets
With ws
Name = Replace(.Name, "List", "")
If Name <> "Master" And IsNumeric(Name) Then
iName = Val(Name)
If iName <= iShow Then .Visible = xlSheetVisible Else .Visible = xlSheetHidden
End If
End With
Next ws
Application.ScreenUpdating = True
End If
End If
End Sub
Příloha: 46317_showhidelists.zip (25kB, staženo 18x)
citovat