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

Match Single Criteria in Excel

No repeat statistic based on a single condition is used wildly in daily work, for example, count type of products, the duplicate types are not encountered. This article describes the way of no repeats statistics for data in a single ...

Excel Array Construction

This article will talk about how to create one-dimensional array or two-dimensional array by using some functions in Excel. When using array formulas in Excel, we often use functions to construct arrays. Generate Array with ROW or COLUMN Functions Array ...

Excel Array Operation

We have all heard of arrays. Depending on the dimensionality, they are divided into one-dimensional arrays and two-dimensional arrays. Depending on the data type, they can also be divided into numeric arrays, logical arrays, and so on. The concatenation and ...

Excel Array Matrix Operation

In Excel, we have a built-in function used to perform matrix operations. It is the MMULT function. This function accepts two arrays as parameters and returns the product of the two arrays. However, this function has a prerequisite that the ...

A1 Reference Style and R1C2 Reference in Excel

In Excel, there are two reference styles. A1 reference style and R1C2 reference style. These two reference styles can help us find the cell by the cell address. Some functions return these two addresses through the argument settings. A1 Reference ...

Sidebar