leeiop.blogg.se

Cara buka password vba project excel
Cara buka password vba project excel












cara buka password vba project excel
  1. #Cara buka password vba project excel how to
  2. #Cara buka password vba project excel code

SubAddress:=”Index”, TextToDisplay:=”Back to Index” Range(“A1”).Name = “Start_” & xSheet.Index

#Cara buka password vba project excel code

I’ve included code to create a dynamic index.įor Each xSheet In Application.Worksheets I’ve got a workbook that presently has 38 pages. I recommend the second method as it will be user friendly, also avoids the unnecessary event calls. Sheets(Split(strSheets, ",")(i)).Visible = True If sht.Name "Main" Then sht.Visible = Falseįor i = 0 To UBound(Split(strSheets, ",")) 'strSheets is parameter to specify the rqeuired sheet names (comma separated) Sub ShowOnlySheets(ByVal strSheets As String) ‘ Method 2:This is another approach to hide unhide the sheets by using Buttons (recommended) If Target.Address = Range("B17").Address Then Private Sub Worksheet_Change(ByVal Target As Range) Method 1: Using Worksheet Events to hide unhide sheets You can achieve this with many approaches, here are the two best methods:

#Cara buka password vba project excel how to

The below example file helps you to understand how to hide or unhide the sheets based on a codition (Range/Selection change), I have also shown another approach using simple buttons.ĭownload the Example VBA file here and explore your self. Hide Unhide sheets based on Condition (Selection Change) And Button Click Sheets("SheetName").Visible = xlSheetVeryHidden

cara buka password vba project excel

The below example will hide the sheet and user can not see it in un hide worksheet dialog list. so that user can not un-hide the worksheet. What if you do not want to permit users to un-hide worksheet, you can set the Visible property of worksheet to xlSheetVeryHidden and lock the VBA code. Sheets("SheetName").Visible = xlSheetHidden For example, following example will hide the worksheet and user can un hide the sheets on right click on sheet tabs: When we hide worksheets using, still user can right click on tabs and un-hide the worksheets. So that user can not code it to open the Worksheets.

cara buka password vba project excel

Once you are done with this, you can protect the VBA project by setting the password to open it. Sheet2.Visible = 2 'to very hide the worksheet You can see the different options of hiding and unhiding the sheets in the following screen-shot. You can set the visual property to hide the worksheets, so that user can not unhide it by right click on the Sheets Tabs. Yes, we can hide the worksheets completely by Changing the visual property. How Hide the Worksheets, so that user can not unhide the Worksheets?: User can right click on the Sheet tabs and Unhide the Worksheets as shown below. When you hide by setting the Visible property is FALSE, it will be available for user to Unhide the Worksheets. The following example will show you how to hide and unhide the worksheet using Excel VBA. We can use Visible= FALSE to Hide a Worksheet, Visible= TRUE to UnHide a Worksheet Hide UnHide Worksheets in Excel VBA – An Example to Hide the Worksheets And have hide all other worksheets, it may be confidential or not useful to that department. While sending the workbook to a specific department, you need to show the worksheets related to that particular department. Like HR, Admin, Finance, etc…, all of these may have same knind of data but the data (numbers) may vary from one department to another. For Example you may be developing a tracker for different departments in an organization. You can hide unhide worksheets using Excel VBA. VBA hide unhide worksheets example macro macro helps when we have many worksheets in a workbook and you want to show only specific worksheets to the user.














Cara buka password vba project excel