+ Reply to Thread
Results 1 to 2 of 2

Making sheets visible/invisible with password

  1. #1
    Registered User
    Join Date
    06-19-2013
    Location
    Peoria, IL
    MS-Off Ver
    Excel 2010
    Posts
    18

    Making sheets visible/invisible with password

    It comes up with errors to make results 2 and recent invisible. help?

    Private Sub Workbook_Open()

    ThisWorkbook.Activate
    ActiveWorkbook.Windows(1).Visible = True
    Sheets("swb").Activate
    Sheets("results 2").Visible = False
    Sheets("recent").Visible = False
    Sheets("swb").Range("h4").Select
    Call HideAllSheets

    End Sub

    'Hide Charts on Open
    Sub HideAllSheets()
    Application.ScreenUpdating = False
    Dim ch As Chart
    For Each ch In Charts
    ch.Visible = xlSheetVeryHidden
    Application.ScreenUpdating = True
    Next ch

    ThisWorkbook.Protect Password:="password"

    End Sub

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Making sheets visible/invisible with password

    Hi,

    a) please use [ code ] tags around your code
    b) what error do you get?
    c) please upload sample workbook if possible

    thank you.
    Please click the * below if this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1