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
 
The Name of the worksheet is "This Project". The Cell that contains the drop down is a merged cell G3:I3.
Change the following lines of code to this:
VBA Code:
Select Case Worksheets("This Project").Range("G3").Value
Case ""
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hm, I am not sure why that would be. I copied your code exactly and only changed those two lines since then and it is working as I expect it should. When you get the error and click debug, is it highlighting a line of your code?
 
Upvote 0
Hm, I am not sure why that would be. I copied your code exactly and only changed those two lines since then and it is working as I expect it should. When you get the error and click debug, is it highlighting a line of your code?
No highlighting now...just the run time error window
 
Upvote 0

Forum statistics

Threads
1,215,545
Messages
6,125,450
Members
449,227
Latest member
Gina V

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