I have three sheets sheet 1 is where user inputs info
sheets 2 and 3 are results
I need to only display one or the other sheet depending on the
value of a cell from sheet 1
I have three sheets sheet 1 is where user inputs info
sheets 2 and 3 are results
I need to only display one or the other sheet depending on the
value of a cell from sheet 1
How familiar are you with VBA? You would need an event handler to capture the value entered, then show/hide the appropriate sheets. Something like:
This uses the Worksheet_Change event handler - this should be in the worksheet module.![]()
Please Login or Register to view this content.
Hope this helps!
Tom Stock
Office version: MSO 2002 SP3
OS: Windows XP Pro
Hardware: IBM Thinkpad T41
Some what new at VB,![]()
I will annotate my code a little better:Originally Posted by swieduwi
To put the code in the worksheet module, hit Alt-F11 to get into the VB Editor. On the left-hand side, right-click on the worksheet you are checking, and click "View Code". Cut and paste the above code sample into the module. Change x and y in the a=ActiveSheet.Cells(x,y).Value statement to reflect the actual cell you are checking against. Also change the Sheet names to reflect the sheets that you want to show (Visible = true) and hide (Visible = false).![]()
Please Login or Register to view this content.
I hope this clarifies everything.
I tried it and could not get it to work.....![]()
I then tried this and it works but it's ugly and not very smooth
![]()
Please Login or Register to view this content.
Last edited by swieduwi; 04-25-2005 at 02:47 PM.
Why is it not smooth? Looks OK to me. You can add Appliction.Screenupdating = False to the beginning to make the screen changes invisible until their done.
If it works, use it..BTW, I left something out of my original code.
My (revised) code equivalent to yours:
If you noticed, your case "x" and case "s" were exactly the same...![]()
Please Login or Register to view this content.
HTH
Last edited by tkstock; 04-25-2005 at 03:02 PM.
Yea, Yours just Looks so much more Professional![]()
Mine looks amature ( oh wait I am)
Yea, there will be another diagram for X just not finished with it yet.
If you noticed, your case "x" and case "s" were exactly the same...
Last edited by swieduwi; 04-25-2005 at 03:18 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks