Waleed
Waleed

Reputation: 919

Prevent/disable Hide Rows without using Protect sheet?

Is it possible to Prevent/disable Hide Rows without using Protect sheet ? Because some users can hide some rows by mistake.I tried using this code on SelectionChange event but not full prove. Thanks for your help.

Activewindow.displayHeadings = False

Upvotes: 0

Views: 293

Answers (1)

FunThomas
FunThomas

Reputation: 29181

As far as I know, there is no event triggered when a row is hidden.

The following code will not prevent that rows are hidden, but it will immediately show them again when the cursor is set to any other cell.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.EntireRow.Hidden = False
End Sub

Upvotes: 1

Related Questions