hide sheets

  1. G

    Request for macro: hide worksheet based on cell-value in it's own worksheet

    I have 20 worksheets. I need to hide those worksheets by macro according to a value in its own specific worksheet. For example,0=hide worksheet, 1=do not hide worksheet: Worksheet 1, fieldA1=0 --> hide worksheet 1 Worksheet 2, fieldA1=1 --> do not hide Worksheet 1 Worksheet 3...
  2. N

    Hide sheets in work book that can be accessed by different teams using a password

    Hi, I'm not sure if this is possible, but I'm hoping there is some VBA that could help me. I have a spread sheet that will hold summary pages for 4 different teams. I don't want each team to be able to see each others summaries, so I want to hide all of the sheets, and maybe have a front end...
  3. K

    Allow to hide sheets in a locked workbook

    Hello, How can I allow to hide sheets in my locked workbook? The code below doesn't work. I receive Error 1004: Application-defined or object-defined error. If I unlock my workbook than the code passes. Private Sub Workbook_BeforeClose(Cancel As Boolean) For Each ws In ThisWorkbook.Worksheets...
  4. L

    Autohide worksheet when when not active

    I want a couple of worksheets to automatically hide when they are not active. I currently have a "go to" button which calls the sheet when I need it but I want these worksheets to be hidden when the user moves to another sheet. Can you please kindly help Thank you
  5. M

    Hide sheet named to a cell on a front sheet

    Hi, i need to hide worksheets based on the content of a cell. I have a summary sheet (called "voorblad") the trigger for one sheet should be the contect of a cell in collumn Q (i.e. Q7) and the name of the sheet is one the same row in collumn C (i.e. C7). this repeats every 3 rows. I want to...
  6. M

    VBA- Hide Multiple Tabs (sheets) based on list

    I have a a few lists on the tab "Master" in cells D3:D10, D12:D16, and D18:D24. These lists have the names of workbook tabs that I want hidden. Is there a quick way to hide all of these tabs so I don't have to do it manually? This is the code I have to hide the first tab but would like a...
  7. GLower0617

    Veryhidden Sheets based on Usernamei and Password

    I found this code searching forums and I have a specific use for it and I am trying to get it to function. I have only made minor changes to it so that it recognized the user row to determine which sheets to unlock. The idea is to prompt for username and password and then unhide the sheets that...
  8. L

    Please simply this macro - hide all sheets except specific set

    Hi, The following macro works, however I am trying to clean up the code Sub ShowSet1() Dim xWs As Worksheet Dim xName As String xName = "Sheet5" For Each xWs In Application.ActiveWorkbook.Worksheets If xWs.Name <> xName Then xWs.Visible = xlSheetHidden End If Sheets("Sheet1").Visible = True...
  9. R

    Hide unselected sheets

    I am trying to create a button on the ribbon that will allow the user to hide only sheets not selected. For example, if I have workbook with [Sheet1, Sheet2, Sheet3, Sheet4] and the user has selected [Sheet1 & Sheet3] then [Sheet2 & Sheet4] would hide. I have the VBA to hide all (except the...
  10. M

    Excel VBA Code: Hide Multiple Sheets with exception to others

    Hi All Can anyone help with my condurum which I can't get to work: For Each ws In Worksheets If ws.Name = "Sheet1" And ws.Name = "Sheet20" Then ws.Visible = xlSheetVisible Else ws.Visible = xlSheetHidden Next For some reason it seems to be also hiding the sheets I've defined to remain visible...
  11. K

    Hide sheets

    I saw this on the message board, which works to hide all sheets but Sheet1. How do I modify it to hide all sheets except Sheet 1 and Sheet2? Dim sht As Object For Each sht In Sheets If sht.Name <> "Sheet1" Then sht.Visible = xlSheetHidden End If Next sht
  12. J

    UDF to Hide/Unhide worksheets and return a string

    Hi, This is driving me crazy! The idea... The user selects a value in a drop-down list, which triggers some sheets to be hidden-unhidden, and fills-up a cell with a message of the outcome. I want to use a single UDF to which I pass variables as needed (i.e. re-use the UDF for each sheet to...
  13. I

    Hyperlink to Hidden Sheets

    Hi, I have a total of 15 sheets on my excel documents. I've hidden 10 (5 sheets will be shown) of those sheets so i can hyperlink to them from the sheet called "The plan". The name of the hidden sheets are called: "Week 1" "Week 2" "Week 3" "Week 4" "Week 5" "Week 6" "Week 7" "Week 8" "Week 9"...
  14. F

    Macro to hide multiple sheets

    Hello, I wrote a macro to select multiple sheets by name and hide them, but I keep getting the following error message: "Object variable or with block variable not set". Below is the macro: Sub HideSheets1A() Dim ws As Worksheet Application.DisplayAlerts = False If ws.Name = "Variance...
  15. andrewb90

    My code from the Macro Recorder keeps giving me errors.

    I thought this code seemed pretty simple - All I need to do is unhide a sheet. From the Macro recorder I got: Sheets("Archives").Select ActiveWindow.SelectedSheets.Visible = True When I run my Macro I get Run-Time Error '1004' select method of worksheet class failed
  16. B

    Button to Push data to a sheet

    Hello All.... I have been working for sometimes on a workbook to calculate marks for my class. My workbook is comprised of 4 sheets. 1. Tools sheet, where I have a list of the various tools that a teacher uses in order to come up with a "Final Mark" for the term, 2. A sheet which summarises and...
  17. F

    Macro to hide sheets with specific names

    Hello, I need a macro that will hide sheet tabs with certain names as well as delete other sheets. However when it comes to processing the code where it has to check for sheet names and hide or leave alone, I am running into an error. Below is the code I'm using: Sub DeleteSheets2()...
  18. S

    How to run a macro after user has chosen save "yes"/"no" upon closing file

    Hi all, I'm making my first moves in the excel macro world, and having the following difficulty: I have an excel sheet in which I build in some checks and macros, so therefore I need to ensure that users execute macros when opening the file. I looked around on the internet and found that...
  19. P

    Hide multiple sheets with a macro

    Hello everyone, I'd like to alter some VB code to hide all the sheets not labeled "Goals". Basically, what I am trying to do is have a user run a macro, have Excel open the "Goals" tab, and hide all the other sheets in the workbook. Do I need to list all my other sheets, or can VB just hide...
  20. I

    How do I disable a worksheet conditional to a form's event?

    Hi, I need to resolve a pressing issue that I have at work. Here is my dilemma. Background Info: Currently, I have 15 users who submit data to me on Excel 2003 spreadsheets that I in turn manipulate to report elsewhere (to upper mgt, the government, etc…). In the short term, I need...

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