Last active
August 21, 2018 16:35
-
-
Save workmad3/0aa52f6231a16eb61b99d1531f989d17 to your computer and use it in GitHub Desktop.
Customer Profile Selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) | |
Dim wsSheet As Worksheet | |
Application.ScreenUpdating = False | |
Select Case Range("H5") | |
Case "Hain" | |
For Each wsSheet In Worksheets | |
wsSheet.Visible = xlSheetHide | |
If wsSheet.Name Like "*Hain*" Or wsSheet.Name = "Customer Contacts" Or wsSheet.Name = "Retail Overview" Or wsSheet.Name = "Strategies & Decision Criteria" Or wsSheet.Name = "Leadtimes" Or wsSheet.Name = "Scorecard" Or wsSheet.Name = "Select Client Profile" Then | |
wsSheet.Visible = True | |
End If | |
Next wsSheet | |
Case "Tyson Pet" | |
For Each wsSheet In Worksheets | |
wsSheet.Visible = xlSheetHide | |
If wsSheet.Name Like "*Tyson*" Or wsSheet.Name = "Customer Contacts" Or wsSheet.Name = "Retail Overview" Or wsSheet.Name = "Strategies & Decision Criteria" Or wsSheet.Name = "Leadtimes" Or wsSheet.Name = "Scorecard" Or wsSheet.Name = "Select Client Profile" Then | |
wsSheet.Visible = True | |
End If | |
Next wsSheet | |
Case "US Nonwovens" | |
For Each wsSheet In Worksheets | |
wsSheet.Visible = xlSheetHide | |
If wsSheet.Name Like "*USN*" Or wsSheet.Name = "Customer Contacts" Or wsSheet.Name = "Retail Overview" Or wsSheet.Name = "Strategies & Decision Criteria" Or wsSheet.Name = "Leadtimes" Or wsSheet.Name = "Scorecard" Or wsSheet.Name = "Select Client Profile" Then | |
wsSheet.Visible = True | |
End If | |
Next wsSheet | |
Case "Bissell" | |
For Each wsSheet In Worksheets | |
wsSheet.Visible = xlSheetHide | |
If wsSheet.Name Like "*Bissell*" Or wsSheet.Name = "Customer Contacts" Or wsSheet.Name = "Retail Overview" Or wsSheet.Name = "Strategies & Decision Criteria" Or wsSheet.Name = "Leadtimes" Or wsSheet.Name = "Scorecard" Or wsSheet.Name = "Select Client Profile" Then | |
wsSheet.Visible = True | |
End If | |
Next wsSheet | |
End Select | |
Application.ScreenUpdating = True | |
Worksheets("Customer Contacts").Activate | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment