Trying to Debug...can anyone guide me please?

mikeb7500

Board Regular
Joined
Jul 30, 2014
Messages
98
Private Sub Worksheet_Change(ByVal Target As Range)
'Application.Volatile



Select Case Worksheets("This Project").Range("G3:I3").Value
Case " "
Worksheets("NEW GUTTERS").Visible = True
Worksheets("GUTTERS & LEAF FILTER SAME").Visible = True
Worksheets("GUTTERS & LEAF FILTER DIFFERENT").Visible = True
Worksheets("LEAF FILTER ONLY").Visible = True
Worksheets("THE CALCULATOR").Visible = True
Worksheets("DATA").Visible = True
Worksheets("1 YEAR PRICING WITH 2225 FIN.").Visible = True
Worksheets("DISCOUNTS").Visible = True
Case "LEAF FILTER ONLY"
Worksheets("NEW GUTTERS").Visible = False
Worksheets("GUTTERS & LEAF FILTER SAME").Visible = False
Worksheets("GUTTERS & LEAF FILTER DIFFERENT").Visible = False
Worksheets("LEAF FILTER ONLY").Visible = True
Worksheets("THE CALCULATOR").Visible = True
Worksheets("DATA").Visible = True
Worksheets("1 YEAR PRICING WITH 2225 FIN.").Visible = True
Worksheets("DISCOUNTS").Visible = True
Case "GUTTERS & LEAF FILTER SAME LENGTH"
Worksheets("NEW GUTTERS").Visible = True
Worksheets("GUTTERS & LEAF FILTER SAME").Visible = True
Worksheets("GUTTERS & LEAF FILTER DIFFERENT").Visible = False
Worksheets("LEAF FILTER ONLY").Visible = True
Worksheets("THE CALCULATOR").Visible = True
Worksheets("DATA").Visible = True
Worksheets("1 YEAR PRICING WITH 2225 FIN.").Visible = True
Worksheets("DISCOUNTS").Visible = True
Case "GUTTERS & LEAF FILTER DIFFERENT LENGTH"
Worksheets("NEW GUTTERS").Visible = True
Worksheets("GUTTERS & LEAF FILTER SAME").Visible = False
Worksheets("GUTTERS & LEAF FILTER DIFFERENT").Visible = True
Worksheets("LEAF FILTER ONLY").Visible = FLSE
Worksheets("THE CALCULATOR").Visible = True
Worksheets("DATA").Visible = True
Worksheets("1 YEAR PRICING WITH 2225 FIN.").Visible = True
Worksheets("DISCOUNTS").Visible = True
End Select
End Sub
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I get a Run-Time Error 13...Mismatch
Can you explain how the code is triggered? I see it's by worksheet change, but you are not checking for a specific cell that has changed? Also, I don't think Select will work like that over a range of cells. Is there one specific cell that should contain the value to show/hide sheets?
 
Upvote 0
Can you explain how the code is triggered? I see it's by worksheet change, but you are not checking for a specific cell that has changed?
What I'm trying to do is display only certain worksheets based on one of 4 options in a drop-down list. (and actually hide certain worksheets in the same workbook, so they can't be completed).
Thanks!
 
Upvote 0
What I'm trying to do is display only certain worksheets based on one of 4 options in a drop-down list. (and actually hide certain worksheets in the same workbook, so they can't be completed).
Thanks!
Which cell contains the drop down?
 
Upvote 0

Forum statistics

Threads
1,215,577
Messages
6,125,637
Members
449,242
Latest member
Mari_mariou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top