hello
i want to hide my sheet if A1.value = 0(zero)
and if unhide the sheet if A1.value = greater than 0(zero)
thanx
hello
i want to hide my sheet if A1.value = 0(zero)
and if unhide the sheet if A1.value = greater than 0(zero)
thanx
this will hide / unhide all sheets, when you open the workbook, based on the value in cell 1,1 of each sheet.
Please Login or Register to view this content.
Click on the star if you think I helped you
hello adyteo
i don't want to hide all sheets
i want only one particular sheet
Please Login or Register to view this content.
Last edited by adyteo; 04-11-2014 at 05:19 AM. Reason: added CODE
Its not working
what is not working? any errors?
did you change "sheetname" to the name of your sheet?
i paste ur code in This workbook
Option Explicitcompile error in hidden module. this workbook. this error commonly occurs when code in incompatible with the veriosn
Private Sub Workbook_Open()
If sheet("v2").Cells(2, 3) = 0 Then sheet("v2").Visible = False Else sheet("v2").Visible = True
End Sub
sorry, it was a typing mistake: I typed SHEET instead of SHEETS
Please Login or Register to view this content.
but adyteo
ur code works when i close and open workbook
i want to work this code with open workbook
i mean i m working on sheets("entry").........and sheets("v2").cells(3, 2) is linked with sheets("entry")
i add a value in sheets("entry") then sheet("v2").cells(3, 2) 's value auto update
after add value with open workbook hide or unhide this sheets
thanx
check the attachmentHideUnhideSheet.xlsm
Hi Haroon2015,
Instead of "Private Sub Workbook_Open()" try "Private Sub Worksheet_Change()".
Add this code by clicking the sheet with the right mouse button and choose "View Code".
Hope it helps.
Cheers.
adyteo
which sample u gave me....................
in ur sample file u added 1 vaue in "entry" sheet.. i want that value
in sheet "V2".....
if i leave the sheet "V2" and A1 value is greater then 0 then don't hide the sheet if value is = 0 then hide the sheet "V2"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks