+ Reply to Thread
Results 1 to 19 of 19

Sheet Tab hide with a Password or Macro

  1. #1
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Smile Sheet Tab hide with a Password or Macro

    Hi Friends!!

    I want to hide sheet tab with and lock it with password..!

    I know, how to hide it from Excel Options --> Advance --> Show Sheet Tab, but if users of my sheet are good on excel they can view my sheet tab by unchecking the show sheet tab.

    I want to hide it with a password or macro..

    Please help me!!!
    abamasd

  2. #2
    Forum Contributor
    Join Date
    04-18-2009
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2016
    Posts
    269

    Re: Sheet Tab hide with a Password or Macro

    Use the code:

    Please Login or Register  to view this content.

    And, password protect the VBA Project.

    --Karan--

  3. #3
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Sheet Tab hide with a Password or Macro

    Hi Friends,

    How can I hide sheet tab not the sheets..! only the sheet tab with password or marcro please help me...!

    I know how to protect sheet tab from EXCEL OPTIONS>ADVANCE>SHOW SHEET TAB uncheck.

    its easy for user to view all my sheets..!

    Please help me!!
    Abamasd

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sheet Tab hide with a Password or Macro

    As far as I am aware you can only show/hide all of the tabs in a workbook.

    The code to do this is
    Please Login or Register  to view this content.

    You could put this in the workbook open event, but what you would achieve I don't really know.
    This can be over ruled by the user changing the options.

    Navigation through the sheets would then have to be done with another macro on the lines of, or at least containing for example
    Please Login or Register  to view this content.
    This could then be protected.
    If you think that this is an option let me know and I will give it a go.

    However if I am reading you correctly, you only want to hide some tabs, I don't think it is possible.

    Others might know better and I will stand corrected.

  5. #5
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Sheet Tab hide with a Password or Macro

    Marcol,

    You are right, i want to show/hide all of the tabs in a workbook.

    Code given by you: "ActiveWindow.DisplayWorkbookTabs = False" will it work to hide/show all the tabs in a workbook if yes.

    Please let me know the complete proceedure to write this code.

    Should I write this code on each sheet? if not, please send me an excel sheet with an example.

    Thanks for your help.
    Abamasd

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sheet Tab hide with a Password or Macro

    It depends on where you want to trigger the code, have a look at this thread and see if it helps.

    http://www.excelforum.com/excel-prog...ml#post2314145

    This shows how to hide the tabs if only one sheet is visible, you should be able to then use a password somewhere to protect the code.

    If you don't find this thread useful, post a sample workbook explaining, how you would like it to work.
    There are to many possiblities to guess what suits you best.

    Cheers

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sheet Tab hide with a Password or Macro

    It might be your solution to do something like this in the Workbook Module

    Please Login or Register  to view this content.

    Where Sheet1 is the sheet you want to be displayed.

    If the user resets the Option Sheet Tabs, the code will trigger when the user selects any sheet other than the one you one you want them to see, and return them to your selected sheet.

    Password protect the vba project, so that they cannot alter the code.

    Hope this helps

  8. #8
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Sheet Tab hide with a Password or Macro

    Hi Marcol,

    this codes not helpfull for me. I just wanted to HIDE SHEETs TAB. and protect it with a password.
    I dont want to hide any sheet in workbook. just want to hide sheets tab. thats it.

    Please help me.
    Abamasd

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Sheet Tab hide with a Password or Macro

    abamasd,

    what are you trying to achieve?

    You say you want to hide the sheet tab and protect it with a password, but you do not want to hide the sheet.

    That does not compute.

    What do you expect to happen?

    A sheet in a workbook can be activated by clicking the sheet tab. Password security can be engaged, so the user must provide a valid password to access the sheet.

    If you do not hide the sheet, the sheet tab will be visible and can be clicked.

    You say you want to "hide the sheet tab and protect it with a password", how would that present in your world? Along with not hiding the sheet, especially?

  10. #10
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Sheet Tab hide with a Password or Macro

    Hi friends,

    Please refer to my attached sheet..!
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Sheet Tab hide with a Password or Macro

    Hi,

    please refer to this sheet...!
    Attached Files Attached Files

  12. #12
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sheet Tab hide with a Password or Macro

    Try this

    In the workbook module
    Please Login or Register  to view this content.

    Uncheck the tab option, then try to select another sheet.

    You could also password protect the vba project, to be double sure, no unauthorized person can find the password.

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Smile Re: Sheet Tab hide with a Password or Macro

    Marcol,

    I really appreciate your all hardwork!!!

    Its realy nice work.

    But, its not allowing me to move from one sheet to another. Actually i wanted to protect sheets tab with a password.

    And i want user to use the buttons or hyperlinks to move from one sheet to another..! I dont want to show all my sheets to the user in sheets tab.

    I believe, if you modify your codes, it can be done..

    I really appriciate!! your all hard works and help..!

    Please refer to attache sheet mac33

    Thanks,
    Abamasd
    Attached Files Attached Files

  14. #14
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sheet Tab hide with a Password or Macro

    Hi abamasd

    Try this workbook.

    It has a warning sheet to counter users gaining access to the sheets if macros are disabled

    It's in 2003 format, I don't have access to a 2007 machine at the moment.

    1/. First open it with macros disabled.

    2/. Try unchecking tabs and unhiding sheets.

    3/. Close the workbook, then reopen it with macros enabled.

    4/. Navigate the sheets by clicking on A1 in any sheet

    5/. Try unchecking tabs and unhiding sheets and see how far you get before the code breaks down.

    6/. Try unchecking tabs the change something on the sheet or select another cell on the sheet.

    Do NOT alter anything on "Sheet1"

    7/. Try renaming any sheet other than "Sheet1" then click on A2 and see the change in the listbox.

    8/. There is no need for buttons they just make life complicated.

    Lastly I can disable Options in 2003, and this makes the file bullet-proof, but I can't manage it yet in 2007 the code for custom ribbons and controls is totally different and seems to be written in XML and not VBa, someone somewhere will have cracked it, but I am not he!!! ...

    As 2003 commandbars are treated as addins by 2007 they are over-ruled by the new fangled ribbons and 2007 controls, so the easy 2003 commands for disabling individual popup commandbuttons is out. Why they introduced this complications I don't know, there will be a very plausible reason I'm sure....

    Let me know how you get on.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.


    EDIT
    Added workbookname to "Sheet1"
    Thanks contaminated for the formulae
    Attached Files Attached Files
    Last edited by Marcol; 06-03-2010 at 04:20 AM.

  15. #15
    Registered User
    Join Date
    01-07-2010
    Location
    Jeddah, KSA
    MS-Off Ver
    Excel 2007
    Posts
    16

    Smile Re: Sheet Tab hide with a Password or Macro

    Marcol,

    My Dear Friend,

    Its not working : (, i just want to hide sheet tab and want move from one sheet to another through buttons or hyperlinks..! just dont want show sheets tabs to users..! as how many sheets are there in that workbook.! but he can visit to any site through hyperlinks or buttons with a small marco..!

    or please send me an example in an excel sheet..

    WIll be waiting for ur reply.

    please help me
    Abamasd.

  16. #16
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Sheet Tab hide with a Password or Macro

    Hi Abamasd

    Looks like I failed to attach the amended file to Post #14, don't know why.

    Rather than post it all again I have edited the post and added the relevant file.
    Please look at the amended post.

    Sorry about that.

  17. #17
    Registered User
    Join Date
    04-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Sheet Tab hide with a Password or Macro

    If Anyone uses excel 2007 , If they go to excel options and tick the check box to show sheet tabs, This macro has no use. I have the same trouble. How to prevent users changing my macro from EXCEL OPTIONS


    Quote Originally Posted by abamasd View Post
    Marcol,

    I really appreciate your all hardwork!!!

    Its realy nice work.

    But, its not allowing me to move from one sheet to another. Actually i wanted to protect sheets tab with a password.

    And i want user to use the buttons or hyperlinks to move from one sheet to another..! I dont want to show all my sheets to the user in sheets tab.

    I believe, if you modify your codes, it can be done..

    I really appriciate!! your all hard works and help..!

    Please refer to attache sheet mac33

    Thanks,
    Abamasd

  18. #18
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Sheet Tab hide with a Password or Macro

    samfaleel,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  19. #19
    Registered User
    Join Date
    04-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Sheet Tab hide with a Password or Macro

    thanks arul, i'll do it . i am new to this forum

+ 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