+ Reply to Thread
Results 1 to 11 of 11

Auto Unhide Worksheet

  1. #1
    Registered User
    Join Date
    03-07-2007
    Posts
    26

    Auto Unhide Worksheet

    What I am trying to do is keep a few worksheets hidden until something is entered onto that sheet using a vlookup formula.

    My Setup is that we have a daily schedule that is on "sheet 1" when we enter certain items on that sheet, vlookup allows them to appear on "sheet 4". now when an Items appears on "Sheet 4" that is when we would like the sheet to become "unhidden".


    Using MVB I found - Sheets("Sheet4").Visible = True

    I tried attaching an IF;then statement to it referencing cell (A5) but either it doens't work like that or the code was wrong.



    Any help guys? Thanks.. I've also searched the forum and no luck

    Thank you
    Nate

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Does this help

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    03-07-2007
    Posts
    26
    Under the "Change to your condition" area What am I putting there or should i just leave it as is.



    Nate

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I just used the word Yes in the cell A5 to trigger the unhiding of Sheet 4. You need to use your own trigger

    VBA Noob

  5. #5
    Registered User
    Join Date
    03-07-2007
    Posts
    26
    ok thanks.. I tried it and its still always visible. I don't know if I need to set something that says "when it doesn't equal yes" visible=false


    It seems like its only affected by the visible pull down menu under properties
    Also When I'm referencing the sheet do I put the name I assigned like "Reports" or "Sheet4'



    Sorry for being a pain
    Nate
    Last edited by Nate5452; 03-07-2007 at 04:52 PM.

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I thought you wanted to make the sheet visible if condition meet.

    If you want to hide the sheet then just change

    Please Login or Register  to view this content.
    if you wany it automated add the code to the lookup sheet. e,g right click sheet name and select view code then add this

    Please Login or Register  to view this content.
    VBA Noob

  7. #7
    Registered User
    Join Date
    03-07-2007
    Posts
    26
    i do want to make the sheet visible if conditions meet. But the sheet is always visible. By changing the value from "yes" to "no" the sheet doesn't dissapear (and I'm not viewing the sheet I want to make hidden i'm editing the sheet by Vlookup)

    I guess it seems my MVB suck (which they do), Its not that big of a deal I was just trying to make things nicer.


    Thanks for all the help
    Nate

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this help

    VBA Noob
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-07-2007
    Posts
    26
    thanks.. That actually helps out alot. Is there any way to make the sheet appear with any value entered. so if left blank it would be hidden if I type "yes", "no" "maybe", or even "fudge" the sheet will appear. And would it work for any item in a pull down menu?


    Thanks
    Nate
    Last edited by Nate5452; 03-07-2007 at 05:23 PM.

  10. #10
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    Please Login or Register  to view this content.
    VBA Noob

  11. #11
    Registered User
    Join Date
    03-07-2007
    Posts
    26
    Anyone have any idea how to use the same code more than once?


    Thanks
    Nate

+ 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