macro to run when I hide or unhide rows in a group

  • Thread starter Thread starter IMcC
  • Start date Start date
I

IMcC

I need to keep a spreadsheet in manual recalc mode but would like it to
automatically recalc when rows in a group are hidden or unhidden.
 
One way.
'============
Public rd
Sub ifrowhidechnage()
hr = Cells.Count
'MsgBox hr
vr = Cells.SpecialCells(xlCellTypeVisible).Count
'MsgBox vr
'msgBox rd
If hr - vr <> rd Then MsgBox "hi"
rd = hr - vr
End Sub
'========
 
Back
Top