Hi Dave,
The code you gave me a while back works great fro hiding and unhiding
columns rows etc. Is there a way to use the same code but change it to
worksheets. I have a bout 15 worksheets that I would like to unhide in
different groups...similar to the column hide and unhide you helped me
with.
Here is the code you gave me...I am hoping it will be easy to
manipulate to worksheets.
thansk so much,
Tina
Option Explicit
Sub HideUnhide()
Dim myBTN As Button
Dim RngToHide As Range
With ActiveSheet
Set myBTN = .Buttons(Application.Caller)
Set RngToHide = .Range("F:I")
End With
RngToHide.EntireColumn.Hidden = Not (RngToHide.Columns(1).Hidden)
If RngToHide.Columns(1).Hidden Then
myBTN.Caption = "Show This Year"
Else
myBTN.Caption = "Hide this Year"
End If
On Error Resume Next
ActiveSheet.UsedRange.Cells _
.SpecialCells(xlCellTypeVisible).EntireColumn.AutoFit
On Error GoTo 0
End Sub
Bookmarks