SwampManJim
New Member
- Joined
- Aug 11, 2017
- Messages
- 3
Greetings, new user who is not a VBA pro and would appreciate help.
I'm also working on a navigate sheets ribbon, which I can post/reciprocate when I finish.
I'm working on a workbook, where the user will select from a list (datavalidation) with a range name "AssetType", and based on their choice sheets will unhide.
I've got maybe 10 items in the datavalidation and have 10 columns with the sheet names I want per choice. I can name these ranges.
I need help after the "then", to loop through my asset types.
For "Vehicle" show the sheets named in range "VehicleSheets"
For "Hand Tool" show the sheets named in Range "HandTools"
etc....
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("AssetType")) Is Nothing Then
If Range("AssetType").Value = "Vehicle" And Not IsEmpty(Range("AssetType")) Then
Me.Visible = xlSheetHidden
Else
Me.Visible = xlSheetVisible
End If
End If
End Sub
I'm also working on a navigate sheets ribbon, which I can post/reciprocate when I finish.
I'm working on a workbook, where the user will select from a list (datavalidation) with a range name "AssetType", and based on their choice sheets will unhide.
I've got maybe 10 items in the datavalidation and have 10 columns with the sheet names I want per choice. I can name these ranges.
I need help after the "then", to loop through my asset types.
For "Vehicle" show the sheets named in range "VehicleSheets"
For "Hand Tool" show the sheets named in Range "HandTools"
etc....
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("AssetType")) Is Nothing Then
If Range("AssetType").Value = "Vehicle" And Not IsEmpty(Range("AssetType")) Then
Me.Visible = xlSheetHidden
Else
Me.Visible = xlSheetVisible
End If
End If
End Sub