Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
Target.EntireRow.Hidden = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, fr As Range
'screen off for speed
Application.ScreenUpdating = False
'reset the worksheet: show all rows/columns
Me.Rows.Hidden = False
Me.Columns.Hidden = False
Set r = Me.UsedRange.Find("ROWHIDE", , xlValues, xlWhole, , xlNext, False, False)
If Not r Is Nothing Then
Set fr = r
Do
r.EntireRow.Hidden = True
r.FindNext
Loop While r.Address <> fr.Address
End If
Set r = Me.UsedRange.Find("COLUMNHIDE", , xlValues, xlWhole, , xlNext, False, False)
If Not r Is Nothing Then
Set fr = r
Do
r.EntireColumn.Hidden = True
r.FindNext
Loop While r.Address <> fr.Address
End If
Set fr = Nothing
Set r = Nothing
Application.ScreenUpdating = True
End Sub
Sub auto_open()
' Run the macro DidCellsChange any time a entry is made in a
' cell in Sheet1.
ThisWorkbook.Worksheets("Sheet1").OnEntry = "DidCellsChange"
End Sub
Sub DidCellsChange()
Dim KeyCells As String
' Define which cells should trigger the KeyCellsChanged macro.
KeyCells = "B3"
' If the Activecell is one of the key cells, call the
' KeyCellsChanged macro.
If Not Application.Intersect(ActiveCell, Range(KeyCells)) _
Is Nothing Then KeyCellsChanged
End Sub
Sub KeyCellsChanged()
'
Application.ScreenUpdating = False 'Turning off screen
'
If Range("B3") = 1 Then
Rows("9:12").EntireRow.Hidden = True
Range("B3").Select
Else
Rows("9:12").EntireRow.Hidden = False
Range("B3").Select
End If
'
Application.ScreenUpdating = True
'
End Sub
Rows("3:65203").EntireRow.Hidden = True
Rows("3").EntireRow.Hidden = True