Hiding/unhiding a sheet based on a cell value

Cliffork

New Member
Joined
Feb 12, 2020
Messages
21
Office Version
  1. 365
Hello,

I have been having an issue with this code lately that is supposed to hide/unhide a sheet dependent on if cell B18 says "True" or "False". Generally what happens is if I enter TRUE to unhide the sheet, it will appear. But within a few minutes it will re-hide itself. I generally get to the step where I need that form in my workflow about 30-40 minutes after I filled in this true/false question, and it will have re-hidden itself. Can anyone help me either fix or replace this code so that it will remain unhidden if B18 still has "True" as its value?

VBA Code:
'Hides/unhides EPA verification page
    If [B18] = "True" Then
    Sheets("EPA Verification").Visible = True
    Else
    Sheets("EPA Verification").Visible = False
    End If
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi,
try

VBA Code:
Sheets("EPA Verification").Visible = Range("B18").Value = True

Dave
 
Upvote 0
Solution

Forum statistics

Threads
1,217,294
Messages
6,135,683
Members
449,957
Latest member
cjames12

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