All,
I'm looking for a way to compact the following code:
Private Sub ShowFriday_Click()
Application.ScreenUpdating = False
Sheets("TeamTotalsFri").Visible = True
Sheets("James Third Fri").Visible = True
Sheets("Eleanor Bell Fri").Visible = True
Sheets("Alan Coombs Fri").Visible = True
Sheets("Andrew Hedley Fri").Visible = True
Sheets("Pete Walton Fri").Visible = True
Sheets("David Holliday Fri").Visible = True
Sheets("David Thornton Fri").Visible = True
Sheets("TeamTotalsFri").Select
Application.ScreenUpdating = True
End Sub
I have the same code for sheets mon - sun, currently I have 7 Buttons ShowMonday - ShowSunday.
I'd like to have 1 code which will unhide any sheets depanding on which button is pressed?
I also need the same thing for:
Private Sub CloseFriday_Click()
Application.ScreenUpdating = False
Sheets("TeamTotalsFri").Visible = False
Sheets("James Third Fri").Visible = False
Sheets("Eleanor Bell Fri").Visible = False
Sheets("Alan Coombs Fri").Visible = False
Sheets("Andrew Hedley Fri").Visible = False
Sheets("Pete Walton Fri").Visible = False
Sheets("David Holliday Fri").Visible = False
Sheets("David Thornton Fri").Visible = False
Sheets("WeeklySummarySheet").Select
Application.ScreenUpdating = True
End Sub
Which maybe easier as the button for these codes are on sheets named TeamTotalsFri etc.
Any pointers,
Thanks
Ian Mac
This message was edited by Ian Mac on 2002-03-04 03:04
I'm looking for a way to compact the following code:
Private Sub ShowFriday_Click()
Application.ScreenUpdating = False
Sheets("TeamTotalsFri").Visible = True
Sheets("James Third Fri").Visible = True
Sheets("Eleanor Bell Fri").Visible = True
Sheets("Alan Coombs Fri").Visible = True
Sheets("Andrew Hedley Fri").Visible = True
Sheets("Pete Walton Fri").Visible = True
Sheets("David Holliday Fri").Visible = True
Sheets("David Thornton Fri").Visible = True
Sheets("TeamTotalsFri").Select
Application.ScreenUpdating = True
End Sub
I have the same code for sheets mon - sun, currently I have 7 Buttons ShowMonday - ShowSunday.
I'd like to have 1 code which will unhide any sheets depanding on which button is pressed?
I also need the same thing for:
Private Sub CloseFriday_Click()
Application.ScreenUpdating = False
Sheets("TeamTotalsFri").Visible = False
Sheets("James Third Fri").Visible = False
Sheets("Eleanor Bell Fri").Visible = False
Sheets("Alan Coombs Fri").Visible = False
Sheets("Andrew Hedley Fri").Visible = False
Sheets("Pete Walton Fri").Visible = False
Sheets("David Holliday Fri").Visible = False
Sheets("David Thornton Fri").Visible = False
Sheets("WeeklySummarySheet").Select
Application.ScreenUpdating = True
End Sub
Which maybe easier as the button for these codes are on sheets named TeamTotalsFri etc.
Any pointers,
Thanks
Ian Mac
This message was edited by Ian Mac on 2002-03-04 03:04