+ Reply to Thread
Results 1 to 14 of 14

Hide and Unhide Sheets automatically

  1. #1
    Registered User
    Join Date
    10-19-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    7

    Post Hide and Unhide Sheets automatically

    hi team,

    my name is elvin and i am new to vba. first of all i would like to introduce my self to you all.

    i am a business analyst in my company and i am making reports charts presentation and also making trackers.

    i am good with excel by the grace of God.
    i havent learnt excel from any institute but i am doing good.

    now i want your help in automation my excel with vba code.

    i am working on the tracker and it has 7 sheets and 350 employee i have in my office. what i want is when i mail the tracker to the floor and once they enable the macro then automatically the tracker will take their USER ID which is somthing like this (lal00v) and hide and unhide the sheet accordingly.
    for agents i have given them level 1 and for team manager level 3 and above team manager level 5 which can access whole tracker.

    can anyone help me with this.
    i will be highly obliged for you kind help.

  2. #2
    Registered User
    Join Date
    06-25-2014
    Location
    Budapest, Hungary
    MS-Off Ver
    2007
    Posts
    40

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    Sounds straightforward, but how would we define user levels?

  3. #3
    Registered User
    Join Date
    10-19-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    7

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    i already defined that because i have their user id through which they login into the system.

  4. #4
    Registered User
    Join Date
    06-25-2014
    Location
    Budapest, Hungary
    MS-Off Ver
    2007
    Posts
    40

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    can i see an example workbook?

  5. #5
    Registered User
    Join Date
    10-19-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    7

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    Your OHR lal00v

    this should be auto-populate when any one opens the tracker…
    5

    This is the level which has been define by me to myself.

  6. #6
    Registered User
    Join Date
    10-19-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    7

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    have u attached the example?

  7. #7
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    the following Function works on our network to see the login name, I guess it all depends on the type of network and login security you use:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-25-2014
    Location
    Budapest, Hungary
    MS-Off Ver
    2007
    Posts
    40

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    There you go. Its a sample sheet of my idea of managing users.

    The first sheet which can be hidden contains the users and their levels.
    When the code detects a user with access level 2 or higher it asks for password to continue.
    For this example the password for level2 is (without quotes) "level 2" and "level 3" for level 3 users.
    When a level 1 user logs in only the first sheet is visible
    When a level 2 then only the first two sheets.
    However when a level 3 user logs in then all worksheets will become visible.
    Is this what u want?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-19-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    7

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    oh great ....thats all i wanted......

    you have been a great help to me.....

    ne more thing i want to ask...is their any way i can learn vba and .net through online...or suggest what should i learn to give wings to my carrer as business analyst.

  10. #10
    Registered User
    Join Date
    10-19-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    7

    Re: i am new to VBA and no money to take classes for the same, so looking for help to HIDE

    thanks a lot

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hide and Unhide Sheets automatically

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  12. #12
    Registered User
    Join Date
    10-19-2014
    Location
    india
    MS-Off Ver
    2007
    Posts
    7

    Re: Hide and Unhide Sheets automatically

    This is solved.....however is their any way that system automatically detect the user I'd of the current user.

  13. #13
    Registered User
    Join Date
    06-25-2014
    Location
    Budapest, Hungary
    MS-Off Ver
    2007
    Posts
    40

    Re: Hide and Unhide Sheets automatically

    Which solution worked for you?

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hide and Unhide Sheets automatically

    I know people like to use USERNAME/PASSWORD combinations in their security designs, but to me that's always seemed redundant on small userbase applications.

    I build password access spreadsheets and simply require a PASSWORD entry. That password is all that is needed to lookup the sheets to make visible.


    Anyway, you can use the ENVIRON("Username") method to detect the computer username.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Automatically Hide/Unhide rows in Excel
    By sanjeeva.vakada in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2014, 10:16 PM
  2. [SOLVED] Automatically Hide and Unhide Columns
    By A Parsons in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-03-2013, 01:15 PM
  3. Hide/Unhide sheets
    By mnewdick in forum Excel General
    Replies: 4
    Last Post: 07-19-2013, 10:11 AM
  4. Replies: 0
    Last Post: 06-12-2012, 11:21 AM
  5. Automatically hide/unhide rows
    By andyb63uk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2012, 05:41 PM

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