+ Reply to Thread
Results 1 to 3 of 3

Sheet tab Restriction

  1. #1
    Registered User
    Join Date
    08-05-2005
    Posts
    59

    Question Sheet tab Restriction

    Hi,

    Is there anyway to restrict someone from accessing a tab?

    something like - if click on tab, then prompt box = password?

    Thanks

  2. #2
    Bob Phillips
    Guest

    Re: Sheet tab Restriction

    You could use Worksheet Activate, like so

    Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
    Dim pwd
    Dim this As Worksheet
    Dim wbState As Long
    Set this = Sh
    If ActiveSheet.Name = "Sheet2" Then
    wbState = Windows(ThisWorkbook.Name).WindowState
    Windows(ThisWorkbook.Name).WindowState = xlMinimized
    pwd = InputBox("supply password")
    If pwd <> "password" Then
    Application.EnableEvents = False
    this.Activate
    Application.EnableEvents = True
    End If
    Windows(ThisWorkbook.Name).WindowState = wbState
    End If
    End Sub


    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "harpscardiff" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > Is there anyway to restrict someone from accessing a tab?
    >
    > something like - if click on tab, then prompt box = password?
    >
    >
    > Thanks
    >
    >
    > --
    > harpscardiff
    > ------------------------------------------------------------------------
    > harpscardiff's Profile:

    http://www.excelforum.com/member.php...o&userid=25960
    > View this thread: http://www.excelforum.com/showthread...hreadid=507189
    >




  3. #3
    Registered User
    Join Date
    08-05-2005
    Posts
    59
    thanks for your reply, i'll give it a go and let you know how I get on.

    Thanks.

+ 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