Chart Hide/Unhide on If Statement Problems

zdensmore

New Member
Joined
May 17, 2011
Messages
1
I am finalizing (or at least trying to) some code for basically one big data filter. Criteria is entered on the first sheet ('Production Well (Start Here)') and then a button is pressed. The code then runs through about six separate worksheets and applies some pivot filtering and some other minor things. Now, once the filters have been applied, I am attempting to have the code hide any charts in which the filters didn't produce the correct results. I placed a simple IF statement in a cell on each worksheet (worksheet titles "Injection 1" to "Injection 6" and the IF statement is in cell AB1). Next, I put code in to activate each worksheet and then test the cell AB1 for either 0 or 1 and then set to either visible or not visible based from this. Now, the problem is that upon pressing the button to activate all of the VBA code, everything runs fine and produces no errors, but every chart included in the code to make visible/make not visible is not visible. The kicker is, that if I simply just click the button to apply the same exact filter again, the chart visible code works. I am using Office 2010 on Windows 7. I'll attach the workbook to see if anyone can help out.
Thanks for any help!

Workbook:
http://dl.dropbox.com/u/10836787/Wolf%20Summit%20Data%20by%20Pattern%20%281%29.xlsm

By the way, if anyone tests out the filter to see what is going on, any single digit number is to be preceded by a 0. Example: "01" (without the quotes of course.) Pattern "01" is one of the better filter criteria because it produces three worksheets in which the charts should be visible and three in which the charts should be hidden.
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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