Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2015, 01:59 AM
easton11 easton11 is offline How to Hide/Un-hide a worksheet based on cell on another sheet. Windows 8 How to Hide/Un-hide a worksheet based on cell on another sheet. Office 2007
Novice
How to Hide/Un-hide a worksheet based on cell on another sheet.
 
Join Date: Jun 2015
Location: Blackpool
Posts: 1
easton11 is on a distinguished road
Default How to Hide/Un-hide a worksheet based on cell on another sheet.

Hi All,

I am trying to hide a worksheet based on the result of another cell.
So....

IF "supply" worksheet Cell E2 = 2 then I want "supply (2)" Worksheet to appear or become unhidden.



Fist time posting so please let me know if there is anything wrong with this post.
I've also tried a few different macros but couldn't get it working.

Many Thanks!
Reply With Quote
  #2  
Old 06-02-2015, 12:07 PM
charlesdh charlesdh is offline How to Hide/Un-hide a worksheet based on cell on another sheet. Windows 7 32bit How to Hide/Un-hide a worksheet based on cell on another sheet. Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

here are 2 simple macros to hide and unhide worksheets.
You need to change the sheet names to that you want to Hide or Unhide name.

Code:
Sub Hide_Worksheet()
If ActiveSheet.Cells(2, 5).Text = "2" Then
    Sheets("Sheet2").Visible = False
End If
End Sub
Code:
Sub UnHide_Worksheet()
If ActiveSheet.Cells(2, 5).Text = "2" Then
    Sheets("Sheet2").Visible = True
End If
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code to Hide columns based on selection on prior sheet Silver1379 Excel Programming 0 04-15-2015 08:40 AM
Hide/Unhide Text Based on Drop Down Selection gw1500se Word 3 02-19-2015 12:17 PM
How to Hide/Un-hide a worksheet based on cell on another sheet. Show/Hide Text based on Checkbox Selection tammytran105 Word VBA 7 10-02-2014 04:30 PM
How to Hide/Un-hide a worksheet based on cell on another sheet. Show/hide paragraphs based on upfront decisions miscia76 Word 1 11-13-2013 04:29 PM
How to Hide/Un-hide a worksheet based on cell on another sheet. Hide Rows and Update Chart based on cell value ubns Excel Programming 5 05-07-2012 05:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft