Awesome! works perfectly. thank youHow aboutVBA Code:Sub skf() Rows("12:18").Hidden = Not Rows("12:18").Hidden End Sub
one issue im facing is that when the sheet is protected, it doesn"t work! any idea how this could be fixed?You're welcome & thanks for the feedback.
Sub skf()
With activeshet
.Unprotect "abc"
.Rows("12:18").Hidden = Not .Rows("12:18").Hidden
.Protect "abc"
End With
End Sub
works perfectly. thanks alotYou will need to unprotect the sheet & the start & reprotect it at the end.Change password abc to suitVBA Code:Sub skf() With activeshet .Unprotect "abc" .Rows("12:18").Hidden = Not .Rows("12:18").Hidden .Protect "abc" End With End Sub