How to Make the Worksheet Invisible by VAB Very Hidden in Excel?

We can easily hide worksheet by right click on worksheet and click on Hide selection. It is the simplest way to hide a worksheet in excel, but on the other side, it is unsafe to hide important worksheet by this method as user can unhide the worksheet through Unhide function directly. So, we need a high-level way to hide the worksheet. This article will show you to hide worksheet by VBA xlSheetVeryHidden, and user can only check the worksheet via VBA code.

Hide Worlsheet by VBA xlSheetVeryHidden


Step1: Create two worksheets Sheet1 and Sheet2.

Step2: Click on Developer tab->Visual Basic. You can also click on Alt+F11 to Microsoft Visual Basic for Applications window.

Make the Worksheet Invisible by VAB Very Hidden 1

Microsoft Visual Basic for Applications window:

Make the Worksheet Invisible by VAB Very Hidden 2

Note:

If Project and Properties are not auto loaded after loading Microsoft Visual Basic for Applications, you can click on View->Project Explorer or View->Properties Window to display the Project Explorer and Properties window. See screenshots below.

Make the Worksheet Invisible by VAB Very Hidden 3      Make the Worksheet Invisible by VAB Very Hidden 4

Step3: Select Sheet1 or Sheet2 which you want to hide from Project Explorer->VBAProject (Book1)->Microsoft Excel Objects. In this case we select Sheet2.

Make the Worksheet Invisible by VAB Very Hidden 5

Step4: Then we can find Sheet2 Worksheet is displayed in Properties window.

Make the Worksheet Invisible by VAB Very Hidden 6

Step5: Under Alphabetic, in Visible dropdown list, select the last one ‘2-xlSheetVeryHidden’.

Make the Worksheet Invisible by VAB Very Hidden 7

Step6: Close Microsoft Visual Basic for Applications window, verify that Sheet2 is invisible now.

Make the Worksheet Invisible by VAB Very Hidden 8

Step7: On Sheet1 right click and select Unhide. Verify that Unhide is in disable status. So, user cannot unhide Sheet2 by Unhide now.

Make the Worksheet Invisible by VAB Very Hidden 9

Notes:

Make the Worksheet Invisible by VAB Very Hidden 10

For Visible options:

  1. The default value for Visible is ‘-1 – xlSheetVisible’. That’s because the worksheet is visible in excel.
  2. 0 – xlSheetHiden’ equals to Sheet->Hide, and user can unhide the worksheet through Sheet->Unhide, that means user can unhide worksheet through excel menu.
  3. 2 – xlSheetVeryHidden’ means hide worksheet by high-level, and the invisible worksheet can only be seen by VBA code.
  4. If you want to see Sheet2 again, you can set ‘-1 – xlSheetVisible’ for Sheet2 again through Microsoft Visual Basic for Applications->Properties->Visible.

 

Related Posts

Filter Data by Column and Sort by Row
filter by column sort by row1

This post will guide you how to use the FILTER function to filter a value by column and then sort data by row in Microsoft Excel. You can use the following formula based on the SORT function in combination with ...

Filter And Transpose Data From Horizontal To Vertical
filter and transpose horizontal to vertical1

This post will show you how to use Filter function and in combination with Transpose function to filter data from horizontal and transpose data as vertical in Microsoft Excel. You can refer to the below general formula based on TRANSPOSE ...

VLOOKUP Formula | Faster Trick with 2 VLOOKUPS
Faster VLOOKUP with 2 VLOOKUPS1

This post will guide you how to use 2 VLOOKUPS function to looking up data entries from a given range of cells in Microsoft Excel. VLOOKUP with 2 lookups can be faster than a single VLOOKUP in certain scenarios. The ...

Extract Unique Items From A List
Extract Unique Items From A List In Excel1

This post will guide you how to extract unique itmes from a given list in Microsoft Excel. How to create a newly formula to get unique values from a range cells in Excel. The unique list of items is the ...

Extract substring In Excel
Extract substring In Excel1

This post will guide you how to use Excel's MID function is a quick and easy way to extract pieces from your text. Use the Excel formula to extract a substring with MID. Note: If you want to extract just ...

How to Use 3D SUM Multiple Worksheets
3D sum multiple worksheets1

To sum a range of numbers is straightforward for most Excel users, but do you know how to establish a 3D reference to total the same range of numerous sheets. In this post, I will present the steps for this ...

Extract all the matches with helper Column
how to extract all matches with helper column1

With Excel's powerful functions IF, INDEX, and MATCH, we can find exactly what you're looking for with a few clicks of the mouse. This step-by-step tutorial will show how easy it is to extract data using these tools and more! ...

If Cell is This Value or That Value

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of logical test. If you want to see if a cell is A or B, and if one of ...

If Value is Greater Than A Certain Value
If Value is Greater Than A Certain Value 1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the logical test result. If you want to see if a value in one cell is greater than a specific value, ...

If Cell is Not Blank
If Cell is Not Blank 6

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

Sidebar